[jdom-interest] SubDocuments

andres march at andres.ws
Thu May 16 13:47:21 PDT 2002


Thank you to the people who replied to the previous post.  But I guess I 
should have mentioned that clone() and detach() will not work in my case 
  because I need the element to be the same element that was taken from 
the parent Document and for that document to be intact.  Anybody know 
why this worked in b6 and, I think, b7?  Why was it possible for the 
same element to be part of 2 documents?

 >Use: new Document((Element)anElementFromAnotherDocument.clone());
 >If you want the other document to remain intact.
 >
 >Or: new Document(anElementFromAnotherDocument.detacth());
 >if you dont care about the other document anymore and woud like to save
 >some memory and cpu cycles.
 >
 >
 >KenR







More information about the jdom-interest mailing list