Perl Monk, Perl Meditation | |
PerlMonks |
Re: munging xml to transformit with xslby rg0now (Chaplain) |
on Feb 08, 2005 at 15:03 UTC ( [id://429073]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|