Boost logo

Boost :

From: Jez Higgins (jez_at_[hidden])
Date: 2005-11-04 04:33:05

Stefan Seefeld wrote:
> That's a good question. My initial proposal a couple of years ago had
> a SAX API. However, SAX has a number of shortcomings that make it hard
> or inapropriate to use (e.g., no namespaces !).

That's not true. SAX was extended to support namespaces above 5 years
ago - see for the Java interface, or my
Arabica library for a C++ version

> A better API that still follows the cursor-style approach from SAX,
> is the XMLReader. It uses a pull model instead of push, i.e. there
> are no callbacks, but instead the application advances the reader's
> internal cursor to the next 'token'.
> See for a comparison to SAX.

For some definition of better. The unpleasantness with pull APIs is the
token - you have to interrogate it for its actual type, and then
dispatch. In certain circumstances this obviously applies to the DOM
too. In other cases, and I accept that I might be unusual in this, SAX
is the right thing to use.


Boost list run by bdawes at, gregod at, cpdaniel at, john at