Subject: Re: [boost] [GSOC] XML library of Boost
From: Bjorn Reese (breese_at_[hidden])
Date: 2013-05-05 05:53:14
On 05/01/2013 05:15 PM, Stefan Seefeld wrote:
> As I have argued many times before on this list, I think it would be
> foolish to try to reimplement all the functionality to support XML.
I went back to read those discussions, and I think that there are good
points on both sides. In my experience, most people only need a simple
XML parser without all the extra features of XML Schema, XSLT, etc.
Others also need fairly simple extensions such as XPath, and finally
some need the full monty. It all depend on their use cases.
> I agree with others that in the context of boost this should be about
> defining a good XML API, and then map that to existing libraries. In
Here is an alternative suggestion. Parsing the XML syntax is fairly
simple, so we could provide a basic XML parser for those with simple
needs. This XML parser should be based on the Builder design pattern
(somewhat reminiscient of a SAX interface). The default builder will
create our own tree/DOM, with which you can do nothing by simple tree
manipulation. In case we need more complex features, such as XML
Schema, we could provide a builder for, say, libxml2, which generates
libxml2 trees that can be used, via the XML APIs you envision, to
invoke the the libxml2 XML Schema validation.
This approach allows us to have a simple XML parser for projects like
Boost.Serialization and Boost.PropertyTree without the need for an
external dependency. It also allows us to do more advanced stuff with
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk