xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Kraus <michael.kr...@informatik.uni-muenchen.de>
Subject DOM Problems
Date Wed, 20 Sep 2000 09:06:50 GMT
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

Mime
View raw message