Boost logo

Boost :

From: Graham Bennett (graham-boost_at_[hidden])
Date: 2005-11-09 20:22:28

On Wed, Nov 09, 2005 at 11:45:29AM +0100, Jose wrote:
> On 11/9/05, Graham Bennett <graham-boost_at_[hidden]> wrote:
> >
> > IMO a streaming interface is much more important than DOM as a
> > starting point - one can easily and efficiently build a DOM from a
> > stream, but starting with an in-memory representation of a document
> > usually precludes streaming. There are a number of XML applications
> > where it is not desirable or possible to hold the entire document in
> > memory at once. A reader interface has advantages over SAX in that
> > it is much easier to program with. It's very easy to do things like
> > implement decorators around readers, and to write generic code that
> > just understands how to use a reader and doesn't care how the XML is
> > actually stored.
> I completely agree. I think the basic interface should be a reader
> interface. Also as per my previous post, this basic interface would
> not have any dependencies on external libraries like libxml2, which I
> think is very bad for a boost library, not to mention the licensing
> issues !

Yes, some degree of separation is a must. Libxml2 is a very good and
portable library, but explicit dependencies are a bad thing, especially
if they can be avoided easily.

> I think a very simple way to look at this is based on the XML file
> size
> reader API --> any file SAX API --> any file DOM API --> small files
> in memory
> So we should start with the general solution and build on top of that.
> Also, has anybody check the Spirit XML examples.
> wouldn't a reader API + spirit give an entry point to a big percentage
> of the XML problem domain ?

The reader api would give you the entry point, a spirit-based parser
implementation (I'm no spirit expert) would seem to make sense as
default implementation to provide with Boost, so as not to add any more



Graham Bennett

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