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

cloneNode() and insert into another document

From: Robert Rangel <rrangel@yahoo-inc.com>
Date: Tue, 08 Feb 2000 20:24:00 -0800
Message-Id: <200002090423.XAA05104@tux.w3.org>
To: www-dom@w3.org
I am trying to copy a node from one document and insert it into a separate
document tree. I tried to cloneNode(true) it and insertBefore() into the
new document, but a DOMException with a code of "WRONG_DOCUMENT_ERROR" is
raised. Why is this a limitation, and is there an easy perform this
operation with standard DOM methods?

I am using IBM's xml4j java parser (XERCES).

Thanks,

Robert Rangel
Received on Tuesday, 8 February 2000 23:23:09 GMT

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