Boost logo

Boost :

Subject: Re: [boost] [GSOC] XML library of Boost
From: Daniel Pfeifer (daniel_at_[hidden])
Date: 2013-04-29 17:32:41

2013/4/28 Andrey Semashev <andrey.semashev_at_[hidden]>

> IMHO, support for SAX is also mandatory. I would even say that SAX should
> be
> the first and the primary thing to be implemented in Boost.XML, as DOM can
> be
> added later on top of it if the time for GSOC allows.

Personally, I find pull-parsing much more convenient than SAX.
But personal preferences put aside, there are generally three approaches to
parsing XML:

1. DOM
2. SAX, push-parsing, callback-driven
3. StAX, pull-parsing, streamreader

Each approach is better than the two others in some way. We need them all
three in Boost (and then in the standard). I believe that these three
approaches may share some code, but don't need to be based upon each other.

You might want to look at pugixml [1], a "Light-weight, simple and fast XML
parser for C++ with XPath support". There might be a reason why it is not
built on SAX.
Concerning pull-parsing, llamaxml [2] and the streamreader from Qt [3] and
may be of interest.
I also wrote a simple stream reader (and writer) that you might find
helpful [4].


cheers, Daniel

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