You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by OEzguer Demir <oe...@web.de> on 2002/04/29 16:05:17 UTC

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


RE: Newbie: how do i copy a Dom tree to another dom document

Posted by Jean-Charles DUFOUR <jc...@ifrance.com>.
Hello !
I'm not an expert, but I think that you must use the importNode() method.
Hope this will help you !

-----Message d'origine-----
De : oezguerdemir@web.de [mailto:oezguerdemir@web.de]
Envoyé : lundi 29 avril 2002 16:05
À : xerces-j-user@xml.apache.org
Objet : 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

 
______________________________________________________________________________
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org