XML pull-parsing

TorgoX on 2003-03-08T03:50:21

Dear All,

So... is there an XML pull-parser? If not, why not?


XML Pull Parsing

ziggy on 2003-03-08T04:09:55

Hm. Interesting question.

The canonical XML Pull Parser is the one in Microsoft's System.Xml namespace for .NET programs. James Clark had some very good words of praise for it in the first year .NET was around, and he suggested that this pull API be adopted more widely because it was good, regardless of any distrust or scorn that hackers tend to have for all things Microsoft.

I haven't been keeping track of more general XML Pull APIs that pop up on xml-dev in the last couple of years. From what I've seen, none of them have been fully completed, or widely accepted as the pull interface to standardize. I don't remember if there's a Perl-based pull API these days...

The topic has come up a few times on xml-dev. The concensus has been that event-based APIs were popular in the early days because they were easy for parser writers to write (and standardize upon), and DOM-based APIs were already a W3C standardized interface, and easier for users to use. No one got around to the middle path of a pull API that was both easy for parser authors to write and users to use.

All of that is just a way to say that there is no good reason why there isn't a standardized pull interface for XML...

Slaymaker once again...

Matts on 2003-03-08T09:11:22

Barrie has one based on SAX. Can't recall if he's released it to CPAN or not yet.

I believe there's also an XML::Parser based one on CPAN somewhere.