Hi Benoit,

if you want to do this, you have to use DOM_Document::importNode().
This is the only way to do cross-document transfer of nodes in DOM (that I
know).

try somthing like this:
        
        DOM_Node nodeToImport = newDoc.importNode( nodeFromOtherDoc,
bDeepCopyFlag );
        nodeFromNewDoc.appendChild( nodeToImport );



Wolfram Frei

Frei GmbH   
Hebelstr. 22   
D-77866 Rheinau
Germany

fon:  +49 7844 99280
fax:  +49 7844 992828
mailto:[EMAIL PROTECTED]
        




-----Urspr�ngliche Nachricht-----
Von: Benoit Lefevre [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 13. Juni 2001 10:42
An: [EMAIL PROTECTED]
Betreff: DOM_Element creation probleme.




Hello.

     Here is my probleme : during my use of DOM part of Xerces, i'd like to
create a
     DOM_Element witch is in some kind of "stand by" state.

     I mean by "stand by" that i'd like to build a DOM_Element like this:

          DOM_Element anElement =
createDocument().createElement(DOMString("A_Tag"));

     And use it later in another DOM_Document.

     To sum it up i'd like to know if there is relation between the
DOM_Document objects and it
     Elements that disable the use the above code line or if it is valide to
do this to create a
     independant DOM_Element ?

Thanks in advence.

Benoit Lefevre.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to