[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: How to merge xml files present in folder into one

Subject: RE: How to merge xml files present in folder into one xml file
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 14 Sep 2005 14:54:30 +0100
ant merge xml files
Saxon allows you to use the collection() function to access all the files in
a directory, for example

collection("file:///c:/some/dir?select=*.xml")

returns all the .xml files in the given folder.

So you can merge them like this:

<mergeddocs>
  <xsl:copy-of select="collection('file:///c:/some/dir?select=*.xml')"/>
</mergeddocs>

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Shailesh [mailto:shailesh@xxxxxxxxxxxx] 
> Sent: 14 September 2005 14:27
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  How to merge xml files present in folder into 
> one xml file
> 
> 
> Hi All,
> 
> I have to merge xml files into one xml file present in folder.
> 
> Say in folder "test1" -- there are five xml files. (here I 
> need to merge
> into one xml file) 
>                    "test2"--- there are six xml files. (here 
> I need to merge
> into one xml file) 
> 
> Final output is two merge xml files with respective 
> foldernames. This I have
> to do using XSL + ANT + Java.
> 
> Can anyone help me for the same.
> 
> 
> Thanks,
> Shailesh

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.