paul.band...@nomura.com wrote:
Ah, thanks.
I did in fact try to do exactly that - but I need to append another
entire document (created by XalanSourceTreeParserLiaison
/XalanSourceTreeDOMSupport) as the child of the root of the XercesDOM
document generated by XSLT+FormatterToXercesDOM.  I've tried appending
the root of the parsed document to the first child of the XSLT generated
DOM but it didn't work and it occurred to me that I might need to do
something special to take care of transferring the ownership of the
parsed DOM nodes to the generated XSLT/DOM?  I tried using clone but
that didn't seem to work either.
These are standard DOM API issues. First of all, you'll need to use the DOMDocument::importNode() member function to create new nodes in the context of the target document. You can then call DOMMode::appendNode() to add the new nodes to the tree.

Finally, you cannot import a document node to another document. Instead, you'll need to append the document element, which you can get by calling DOMDocument::getDocumentElement().

Please ask future questions regarding the Xerces-C DOM on the Xerces-C user list. You can find good DOM API documentation by searching using your favorite search engine.

Dave

Reply via email to