Re: Copying from one DOM to another

>what would be the easiest and more direct way of
>converting nodes from one implementation to another?

From http://www.w3.org/DOM/faq.html:


NEW: How do I move a Node from one document to another?

     Neither Level 1 nor Level 2 allow you to move a Node from one document
to another, although Level 2 has
     an importNode method which allows you to copy a Node from one document
to another. So, using Level 2,
     you copy the Node from the source to the target document and then
delete the Node from the source
     document. If you want to do this in Level 1, you will need to write
your own function that creates a new Node
     in the target document and then copies the data.



importNode should work across implementations, if both have implemented the
DOM correctly.

______________________________________
Joe Kesselman  / IBM Research

Received on Tuesday, 7 November 2000 09:59:19 UTC