Concatenating many XML files
My program accesses 50 xml files one at a time, uses JAXP API and DOM parser to update each and puts the updated DOM into a new XML file. So, I will be left with 50 updated xml files. Its fine till now...
But what I want to accomplish is to have a SINGLE xml file as output instead of 50 different xml files.
i tried to append one dom to an other as a child element but it didnt work as we cannot append DOMs.
Is there any way to concatenate these XML files? Infact, I need to concatenate the first child of every XML file in to a single new xml file.
one more question......is there a way to concatenate the several DOMs that I got using JAXP API? I mean I dont want to create 50 xml files and then concatenate them. what i want to do is to merge the DOMs as they are formed...is it something possible?
Any suggestion is greatly appreciated!