W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2000

Re: Copying from one DOM to another

From: Joseph Kesselman/Watson/IBM <keshlam@us.ibm.com>
Date: Tue, 7 Nov 2000 09:57:34 -0500
To: <www-dom@w3.org>
Message-ID: <OF5FA0BF0D.22E29F9C-ON85256990.0051E434@pok.ibm.com>

>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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT