Title: RE: Moving Nodes Among Documents

>>Is there currently a means in Xerces-J to move nodes between documents? If
>>not, are there plans to support this? I'm trying to incrementally build a
>>DOM based on data contained in numerous smaller DOMs. Any suggestions on
>>strategies for doing this using either XSL or DOM? Thanks, Scott

You probably ought to send this to the xerces-j  mailing list, but in both the C++ & Java versions the importNode() function is used:

C++
---------------------------------------------------------------------
DOM_Document oldDoc = GetOldDocument();
DOM_Document newDoc = DOM_Document::createDocument();

DOM_Node root = newDoc.importNode( oldDoc.getDocumentElement() );
newDoc.appendChild( root );

For Java, remove the DOM_ and replace the scope resolution operator...

Reply via email to