aspose file tools*
The moose likes XML and Related Technologies and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark ""Merging" XML files" Watch ""Merging" XML files" New topic
Author

"Merging" XML files

Dave Edds
Greenhorn

Joined: Oct 14, 2004
Posts: 13
Hi,

I am relatively new to XML / XSL and have a question regarding how I can insert some XML into another XML file.

I have an automated daily build process, using ANT, which invokes JUnit to produce a set of results. I then run an XSLT transform over the results to produce an XML file (Summary.XML) of summary information. This process works fine.

I want to create a History XML file of the results for all days. So I would like to add the information from my Summary.XML file to the end of my History.XML file. In this way I can build up a single XML file of all of the results, which I can graph, chart, do whatever with.

But I cannot append the contents of Summary.XML to the end of History.XML since this would create invalid XML. Is there a way in my XSL transfrom to insert the produced XML to the end of an existing XML file?

I'm really not sure what the best approach is to achieve what I want, so any help or advice would be greatly appreciated.

Thanks in advance,
Dave
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
I had a similar problem with merging chunks of XML from online surveys. I ended up writing a general purpose XML chunk merging utility routine described in this article. You can download the source from my web site at www.wbrogden.com
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "Merging" XML files