Barrie Slaymaker has just released XML::SAX::Machines to CPAN. For those of you who missed the announcement on the Perl-XML list, SAX::Machines is a SAX pipeline construction toolkit. It's lego for XML.
We were just now looking at neat ways you can do XML stuff on the command line with the current SAX based solutions. For example here's a passthru parser:
But then Barrie chimed in with this beauty, based on SAX::Machines:
SAX::Machines basically facilitates constructing SAX pipelines, and he's put some really cool facilities together so you can do this easily, including some mind blowing facilities for processing an XML document in record oriented fashion through whatever SAX engine you like. The "lego" bit is you simply pass in SAX filters or parsers or serialisers to the constructor (Pipeline in this case), and it manages the entire thing for you.
It's seriously cool technology. And I think Barrie is going to be doing an article about it some time soonish. I look forward to that.