Help on using importNode() method for DOM 2

I need help on using method importNode(Node importedNode, Boolean Deep). I have three document interface and need to combine it to one. I'm uinsg importeNode() method from Document Interface to accomplish this. Does anyone know if i'm on the right path? I have Document Doc1, Document Doc2, and Document Doc3.

I import this after defining a new document factory and document builder and create a new document "NewDoc" the syntax is show as:

NewDoc.importNode((Node)doc1.getDocumentElement(), deep) where boolean deep=true.

I used transformfactory to printout the NewDoc and no information was in it. It doesn't make sense. Can someone help me?

[678 byte] By [MB_75] at [2007-9-26 1:36:35]
# 1

I had the same problem earlier, and here's how I solved it:

Element elTemp = null;

Document docTemp = null;

docTemp = readDocument(filePath);

elTemp = (Element)docResultDocument.importNode(docTemp.getDocumentElement(),true);

docProcedureResultXML.appendChild(elTemp);

Put simply, yes, you are on the right track.

Toranth at 2007-6-29 2:22:18 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...