W3C home > Mailing lists > Public > www-dom@w3.org > January to March 1999

Re: Is there a method to copy a node from one document to another

From: David Brownell <db@Eng.Sun.COM>
Date: Thu, 14 Jan 1999 17:11:56 -0800
Message-ID: <369E95DC.A5B2F3F8@Eng.Sun.COM>
To: Christophe Ney <christophe@lutris.com>
CC: www-dom@w3.org
Christophe Ney wrote:
> 
> I am using the DOM with java servlets and I couldn't find any method
> to copy a node from one document to another document.

As has been noted before, DOM itself does not support such a method.

It being a useful thing to be able to do, however, several versions
of DOM support extensions which enable this.  In particular if you
use Sun's package, the "com.sun.xml.XmlDocument.changeNodeOwner()"
method lets you do that.  Of course, this won't work if you're trying
to mix DOM nodes from multiple implementations.

- Dave
Received on Thursday, 14 January 1999 20:12:08 GMT

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