• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

How to combine two DOM document into One Dom document

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Has anyone got any tips to,combine two DOm document to one Document.I would appreciate your help.

Raj
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic