Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

gnat (29)

gnat
  (email not shown publicly)

Journal of gnat (29)

Monday November 19, 2001
05:16 PM

XML::SAX and the PerlSAX2 Project

[ #1303 ]
Major major MAJOR kudos to Matt Sergeant and Robin Berjon for their kickass work on the PerlSAX2 project. For those of you who don't know, Perl's primary XML parsing system has been the XML::Parser module hacked up by Larry as proof-of-concept which then became the de facto standard. It doesn't support alternate parsers (e.g., a pure Perl solution) so building code around XML::Parser has really limited the growth of Perl's XML support.

PerlSAX2 attempts to replace XML::Parser as the basis for other XML modules. XML::SAX isn't a parser, but it'll select one for you. There are two supported right now, Expat (the C library XML::Parser is based on) and a Pure Perl solution.

That's right, XML parsing in pure Perl. I want to buy Matt a beer for that alone.

What's the big deal about PerlSAX2? As more modules are based on it, instead of XML::Parser, we'll be able to take advantage of the features of different XML parsers. No more being tied to expat! This will, I hope, lead to better performance (we're running into callback limitations with XML::Parser) and quicker adoption of new XML doodads in Perl.

Ultimately, Perl will become the XML language, everything else will wither and fade away, we shall go on to force-feed punctuation-shaped humble pie to the W3C before proclaiming ourselves emperors of the world! Hmm, perhaps too much Pinky and Brain for me. Are you pondering what I'm pondering, Matt?

--Nat