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

Re: Big XML file


perl large xml file
David Megginson wrote:

>Miguel A. Robles writes:
>
> > Many thanks for your help. Now, I know I can manage large XML files
> > with SAX and it works fine. The problem now exists when I need to
> > update the content of an element or any of its attributes. I'm not
> > sure, but I think that SAX cannot be used for that purpose.
>
>SAX per se is just a common interface, and cannot do anything.
>However, there are SAX clients (like my own XML-Writer and probably
>many better ones) that take SAX events and generate XML markup from
>them.  So if you take a SAX parser and register a SAX writer as its
>client, you have an XML identity transformation with only a few lines
>of code.
>
>Now, create your own filter to sit between the parser and the writer.
>All your filter has to do is intercept the events it wants to change
>and generate new ones to replace them.  That may be an easy or
>difficult task, depending on the scope of the changes (i.e. renaming
>or splitting a few elements is easy, restructuring a large subtree
>isn't).
>  
>

You can avoid programming of callbacks by using STX, a SAX-based 
transformation language.  The rules to update your data can be then 
given in a form of XSLT-like templates. There are implementations in 
Java and Perl available [http://stx.sourceforge.net/].

Regards,
Petr


-- 
Petr Cimprich
Ginger Alliance
www.gingerall.com



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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.