Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Take two xml documents and join them using Xalan as the parser

 
JayaSiji Gopal
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I have two xml documents with me. I need to take the data from the two documents and make a single document out of them,
Is there any way to do this? meanwhile, we have been recommended to use XALAN as the parser in our project.
Is the above possible using this parser?

Any links or code snippets would be helpful!
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only thing I can say based on your explanation is - yup, its doable.
Some links...uhhhh....the only links I can come-up with are those to the DOM tutorials. There probably is no ready solution, but hope this gives you a starting point in case you are not familiar with DOM.

- m
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would help if we'd know more about what kind of a merge is needed, i.e. what kind of documents these are and what should the resulting combined document look like.
 
Honour Cook
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you use XSLT? I know in XSLT stylesheet you can include another xml document and manipulate it.

Basically, you can use one of the xml as the source data for your xslt. In xslt include the second xml, so after the transformation, you could get data from two xml files into one document.

Cheers,
Honour
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic