[jdom-interest] Cloning Elements (help)

Jason Hunter jhunter at acm.org
Thu Jun 28 18:10:13 PDT 2001


I don't follow what you're saying.  But if you don't care about the
original doc, it'll be faster to detach() the element than clone() it.

-jh-

"Owens, Matthew J" wrote:
> 
> Hi
> 
> I'm trying to take a root element of one document and embed it (and all it's
> children) into another XML document using JDOM. The process does work but it
> has the side effect of exposing all the elementID/type/version attributes,
> note this is not the case for the elements which have not been transferred
> (e.g. TagE/AutoCommit).
> 
> The code called the clone() method of the original NOE element to make a
> copy to embed in this document.
> 
> Any ideas about how to switch off this behaviour ?
> 
> Thanks In Advance
> 
> Mat
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <Input>
> <Message>
>         <NOE elementID="F54477F5" type="F54477F5" version="1">
>                 <TagA elementID="D9A8BF02" type="66AD3D18"
> version="1">NEWM</TagA>
>                 <GenInfo elementID="654CA5A1" type="B8B7F101" version="1">
>                         <TagB elementID="B11B7B61" type="A761C7D1"
> version="1">2001062200000003</TagB>
>                         <TagC TradeRef elementID="74FEA855" type="A761C7D1"
> version="1">GS01062200006</TagC>
>                 <TagD elementID="1A6A88D1" type="integer"
> version="1">001</TagD>
>                 </GenInfo>
>         </NOE>
> </Message>
> <TagE>NORMAL</TagE>
> <AutoCommit>NO</AutoCommit>
> </Input>
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list