How to combine two DOM document into One Dom document
Raj Sethi
Greenhorn
Joined: Mar 11, 2001
Posts: 9
posted
0
Hi Has anyone got any tips to,combine two DOm document to one Document.I would appreciate your help.
Raj
Ajith Kallambella
Sheriff
Joined: Mar 17, 2000
Posts: 5781
posted
0
Take a look at the cloneNode() method on the org.w3c.dom.Node class. You can take the root node of the second DOM tree, clone it and attach it to a particular node in the first DOM tree. Disclaimer - I haven't tried this myself, but it should work! ------------------ Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform. IBM Certified Developer - XML and Related Technologies, V1.
Open Group Certified Master IT Architect.
Sun Certified Architect(SCEA).
Originally posted by Daniel Olson: Here is a link to an article called Use XSLT to Merge XML Documents http://www.xmlmag.com/upload/free/features/xml/2001/06jun01/rj0103/rj0103.asp Also there is another article in XML Developers Journal this month or last month that give three different ways to combine documents.
Raj Sethi
Greenhorn
Joined: Mar 11, 2001
Posts: 9
posted
0
Originally posted by Raj Sethi:
Thanks Ajith,Daniel I want to this task using java not XSl,I will give a try to cloneNode(). Has anyone familiar with importNode().what it does and how it does that would be good.
subject: How to combine two DOM document into One Dom document