Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: munging xml to transformit with xsl

by rg0now (Chaplain)
on Feb 08, 2005 at 15:03 UTC ( [id://429073]=note: print w/replies, xml ) Need Help??


in reply to munging xml to transformit with xsl

As noone has pointed it out before, I have to call your attention to SAX (Simple API for XML). SAX is an alternative to DOM specially crafted to inetrpret huge XML files.

On the one hand, it gives you a pretty simple API to work on XML files abstracting them as streams thus avoiding the need to load the entire DOM tree into memory. On the other hand, it does not give you the full power of XSLT and most of the programmers (quite sincerely, I am amongst them) find it a bit hard to work with its event-driven interface as compared to the good old DOM-style tree-model.

However, if your transformations needed to be applied to your largish XML file are not overly difficult, then you definitely should consider rewriting your XSLT transformations as simple SAX-based scripts (see for example XML::LibXML::SAX for a good SAX parser for Perl).

rg0now

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://429073]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-03-28 12:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found