• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

How could I join 2 xml documents

 
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to combine 2 XML documents into 1 and apply transformation. Half data is in one XML and other half in the other XML. Transformer.transform takes only 1 source. XSLT has document() function but I want to perform transformation on stream. That is component doesn't know anything about files.
Is there elegant solution for this.

Best regards
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if this is what you need, but I wrote a utility to combine multiple chunks of XML formatted text into a single Reader which you can then turn into an InputSource. ( see this article for a description.)
You can download the source from my web site.

Bill
[ August 02, 2004: Message edited by: William Brogden ]
 
Vladas Razas
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you!
 
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
may be thiscan help.

Also please check out IBM's alpha works page. The XMLTreeDiff utility can be used to perform your task.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!