xsl-list
[Top] [All Lists]

RE: newbie: merging XML files using XSLT

2003-04-29 11:05:29
[ Holk, David A]
I have five simple(flat) XML files that I need to aggregate 
into a single,
more complex xml file.

I am trying to avoid using DOM for performance reasons.

Is there a way to use and existing xml file as output for a XSL
transformation(essentially appending elements to an existing file)? 


Read it in using document(), copy it to the output using copy-of(), then
proceed with the rest of your transformation.

If you do it literally this way, you will need to supply an overall
wrapper element so that the output xml file will have a single document
element.  If you want the output file to have the same document element
as the input file, you will probably want to use copy-of on the child
elements of the document element, rather than on its root.

Cheers,

Tom P

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>