XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Sushant PrabhuSubject: breaking a huge xml file into smaller chunks
Author: Sushant Prabhu
Date: 24 Jan 2007 03:21 AM
Hi All,

Currently I am using xsl to generate xml to xml transformation & it works fine.
Now the genreated xml file is huge & i need to split this 1 huge xml file into smaller chunks & preserving the start & end tag of the orginal file in the new files in my case <packageBody> tags

So say the huge file I have is something like this
------------------------------------------------------

<packageBody xmlns="http://xmlschemas/importexport" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlschemas/importexport/packageBody.xsd">
<importProject>
<group name="Loadtest"/>
<project>
<name>Links</name>
<description/>
<projectPath>Antarctica</projectPath>
</project>
</importProject>
<importProject>
<group name="Loadtest"/>
<project>
<name>Photos</name>
<description/>
<projectPath>Antarctica</projectPath>
</project>
</importProject>

<importProject>
<group name="Loadtest"/>
<project>
<name>Links</name>
<description/>
<projectPath>Africa</projectPath>
</project>
</importProject>
<importProject>
<group name="Loadtest"/>
<project>
<name>Photos</name>
<description/>
<projectPath>Africa</projectPath>
</project>
</importProject>


</packageBody>
------------------------------------------------------

Now i want this in chunks something like this

------------------FILE 1-------------------------------
<packageBody xmlns="http://xmlschemas/importexport" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlschemas/importexport/packageBody.xsd">

<importProject>
<group name="Loadtest"/>
<project>
<name>Links</name>
<description/>
<projectPath>Africa</projectPath>
</project>
</importProject>
<importProject>
<group name="Loadtest"/>
<project>
<name>Photos</name>
<description/>
<projectPath>Africa</projectPath>
</project>
</importProject>

</packageBody>
------------------------------------------------

---------------------FILE2---------------------------
<packageBody xmlns="http://xmlschemas/importexport" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlschemas/importexport/packageBody.xsd">
<importProject>
<group name="Loadtest"/>
<project>
<name>Links</name>
<description/>
<projectPath>Antarctica</projectPath>
</project>
</importProject>
<importProject>
<group name="Loadtest"/>
<project>
<name>Photos</name>
<description/>
<projectPath>Antarctica</projectPath>
</project>
</importProject>

</packageBody>
-------------------------------------------

Do post your suggestions on the same.


Regards

Posttop
Tony LavinioSubject: breaking a huge xml file into smaller chunks
Author: Tony Lavinio
Date: 25 Jan 2007 06:02 PM
General XSLT questions and questions not pertaining to Stylus Studio
should be asked on the XSL-LIST run by Mulberry Technologies.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.