Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-11-07 12:46:24

I've only looked at some of the posts on this thread so I haven't followed
everythihg there.

I'm curious as to why spirit - which includes an XML parser - has not been
mentioned. I used it to great effect with the serialization library. Yes
is effort to learn to use spirit - and I only learned the bare minimum to
get it to work for the serialization library. But it was a lot better then
spending (a lot more) time writing xml parsing from scratch. Even
more importantly, its much, much easier to maintain as it's basically
data driven code. It seems that lots of the functionality being
discussed is available "right out of the box" with spirit and the
include xml examples. Want a DOM style parser - I believe
that something similar is available "out of the box" with the
included parse tree generator. Want a SAX style parser, Specify
your own action routines as tokens are recogized.

> but I would like to see at least these different APIs:
> * on-demand parsing, a parser drived by a cursor, that allows to
> navigate through a document, without loading it completly (I dont see
> a need for prior validation, here)

The serialization library does exactly this with the spirit xml parser.
> * direct mapper of c++ structures to a certain format, so a kind of
> xml serialization,

I'm not sure how this differs from the xml serialization already in the
serialization library.

I'm exactly sure what you have in mind, but I can see the need for a program
which reads and xml schema and generates C++ data structures which
can be navigated with previously compiled code modules. I think this
would be fairly easily achieved using spirit xml parsing.

As you can see, I think spirit is underrated. It IS hard to learn - and I'm
in no way an expert but I have managed to find it very useful.

Robert Ramey

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