importNode() returns a Node obj which then needs to be appended to the doc.
do a appendNode() after the importNode() call.
Sire
[EMAIL PROTECTED] on 06/06/2001 11:25:18 AM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:
Subject: Problem with Document replication
Hi,
I have a problem with a certain operation : I'd like to create a new
Document with a node {Element} extracted from another existing document
.... here is the class :
public Document Decomposer(Document docXML)
{
DocumentImpl XMLElementary = new DocumentImpl( );
NodeList NL= docXML.getElementsByTagName("Word");
Node node_ent = NL.item(0);
Node node = node_ent.cloneNode(true);
XMLElementary.importNode(node,true);
System.out.println(XMLElementaire.hasChildNodes());
<-------- this answers "false" .....
return XMLElementary;
}
The problem is that my new Document "XMLElementary" is empty .... it
haven't any ChildNodes ..... I don't understand why ??
Thank you !!
---------------------------------------------------------------------
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]