gabriele renzi surrender_it@remove.yahoo.it wrote in message news:739c50l79fn0ffa9oui6dfpjk5jvot4cf2@4ax.com…
I know that REXML has experimental support fro this api,
I wonder how much experimental it is, and if somebody else used it.
I’d be careful around:
- Namespace support.
- “Proper” text node handling. Specifically, the best behaviour
would be if the pull parser reported entities separately, but it
doesn’t.
Otherwise, it should be fairly complete.
On a sidenote, I’d like to hear from the XML gurus out there what they
think of this API (and on a sidesidenote , what is the reference for
this kind of api, xmlpull.org seems quite unmantained…)
I was a real doubter when I first started it, but I’m starting to
really like the SAX2 and Pull APIs. Specifically, I’d like to get
pattern matching working better in SAX2. They’re both really nice
APIs if you aren’t doing any document manipulation, or if you don’t
need to process the entire document.
There isn’t really any reference for the pull API. Somebody requested
it, so I hacked it together. As usual, rather than looking at any
specs (Specs? We don’t need no stinking specs) I asked people to send
me examples, pseudocode, that they’d write if they had access to this
API. This is an extrapolation of test-first development, and I think
it produces better APIs. It gets the developer looking at the problem
from the user’s POV, rather than from an implementation POV, which
helps to keep the implementation details from leaking into the API.
Ironically, the Pull parser became the core parser upon which all of
the other parsers are based. This is because you can implement a tree
or stream parser using a pull parser, but not vice versa – at least,
not without some contortions.
The SAX2 API was a different matter, because the SAX2 spec is really
simple, loose, and actually pretty well written. It emphasizes
behaviors rather than a specific API, so I tried to conform to it.
Finally, most of the bug reports I get are still for the Document API.
I get very, very few bug reports on the SAX2 or the Pull Parser APIs.
Since I know there are deficiencies in those APIs, this tells me
that not many people are using them, and/or are not using them
heavily.
— SER