[prev in list] [next in list] [prev in thread] [next in thread]
List: xerces-j-user
Subject: RE: Newbie: how do i copy a Dom tree to another dom document
From: "Rajesh_KumarT" <Rajesh_KumarT () infy ! com>
Date: 2002-04-30 2:38:29
[Download RAW message or body]
Hi,
There are two possible problems:
1. You cannot use append child directly to copy a part of a DOM tree into another \
one. You have to use
importNode(Node importedNode, boolean deep)
of the Document interface.
2. Another problem you can face even after using the above is incompatibility between \
two DOMs, i.e. One of the document object can be a DOM 1 object where as the other \
can be DOM 2. But you need not worry about this if you are using the same Xerces \
package for creating all the documents.
Hope this helps,
Rajesh.
-----Original Message-----
From: OEzguer Demir [mailto:oezguerdemir@web.de]
Sent: Monday, April 29, 2002 7:35 PM
To: xerces-j-user@xml.apache.org
Subject: Newbie: how do i copy a Dom tree to another dom document
Hi!
I am new to Xerces 2 for Java and i am trying to copy a part of a dom tree to a new \
dom document but with cloneNode(true) and then appendChild(..), i just get a \
DOMException:
DOMException: DOM005 Wrong document
So i looked at DOMException! It just tells me that i cannot use a node in a document \
which it did not create it! *grmbl*
Is there any help (method) or do i have to write recursive function which is creating \
all the elements and values?
thnx
OEzguer Demir
p.s.: sorry for my bad english!
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic