[XML-SIG] merging two separate DOM trees.

chris davis chris@rpgarchive.com
Sun, 2 Apr 2000 23:16:24 -0500

I'm hoping someone can help me on this.  I'm using DOM in my application and
I want to insert a xml document into another xml document at a specific
node.   I'm using DOM and I tired the following.

reader = utils.FileReader(f.GetPath())
new_doc = reader.document
new_xml_node = doc.get_firstChild()

At this point I get the "Node created from a different document" error.
I understand what's causing the error, but how can I merge two DOM trees
together. I Use DOM extensively in my app, so I'd really like to accomplish
this without having to move the XML data to a different abstraction, but
I'll take any solution at this point.  Thanks.

chris davis

adventure database and open news forum

check out OpenRPG! open source online rpg!