Boost logo

Boost :

From: Boris Kolpackov (boris_at_[hidden])
Date: 2007-03-01 12:59:22

Hi Robert,

"Robert Ramey" <ramey_at_[hidden]> writes:

> A while ago I made a suggestion about using the spirit parser with its
> associated xml grammers.
> No one has commented on this. I'm curious why this idea doesn't seem to be
> attractive to anyone else.. I used it with very good results in the
> serialization library. It created a much more robust and maintainable
> parser than I could have done by hand. What am I missing here?

The question is whether it is a conforming XML parser? That means
support for:

- namespaces
- character references
- entity references
- DTD well-formedness checking, entity declaration processing and
  replacement, substitution of default attribute values, etc.

My uneducated guess is that "spirit-based XML grammar" is not a
conforming XML parser. The next question is how much effort it
will take to fix it up and whether it will still be as robust,
maintainable, and efficient (I doubt it very much).

The reason why you had good results with serialization library
is because you control both production and consumption of the
instances so you can easily restrict yourself to a subset of XML.
Once you need to process *any* valid XML things get a lot more


Boris Kolpackov
Code Synthesis Tools CC
Open-Source, Cross-Platform C++ XML Data Binding

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