xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Sabu" <Joe.S...@dothill.com>
Subject Re: DOM Problems
Date Wed, 20 Sep 2000 14:06:09 GMT
look at Document.importNode(Node importedNode, boolean deep) API
          
----- Original Message ----- 
From: "Michael Kraus" <michael.kraus@informatik.uni-muenchen.de>
To: <general@xml.apache.org>
Sent: Wednesday, September 20, 2000 5:06 AM
Subject: DOM Problems


Hello,

I'm experiencing a problem with the DOM (I'm using the Xerces-J DOM
implementation). I'm writing a kind of XML editor where the user is able
to select and copy nodes from one document tree and paste is into
another. But when I try to add the copied nodes to the new document
tree, I receive the following exception:

org.apache.xerces.dom.DOMExceptionImpl: DOM005 Wrong document

I use some code like this:

targetDocument.appendChild(sourceDocumentNode.cloneNode(true));

How can I copy nodes from one document to another? Is there any solution
within the DOM or within Xerces?

Michael

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org




Mime
View raw message