Subject: Re: [boost] New XML library
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2008-12-10 16:23:05
Themis Vassiliadis wrote:
> I have been working in a C++ library like Apache Digester
> (http://commons.apache.org/digester). I'm intending to convert it
> following boost policies described in Requirements and Guidelines.
> What are the chances of it become a Boost library ?
Personally I would like to see something like RapidXML in Boost.
It seems that Apache Digester provides an element matching
infrastructure. This could be useful, as manually iterating through
the parse tree that something like RapidXML generates can be a bit
tiresome. It should probably be layered on top of a lower-level XML parser.
I have found this example at
public class SampleDigester
public void run() throws IOException, SAXException
Digester digester = new Digester();
// This method pushes this (SampleDigester) class to the Digesters
// object stack making its methods available to processing rules.
// This set of rules calls the addDataSource method and passes
// in five parameters to the method.
digester.addCallMethod("datasources/datasource", "addDataSource", 5);
// This method starts the parsing of the document.
// Example method called by Digester.
public void addDataSource(String name,
// create DataSource and add to collection...
It parses XML like this:
This seems to be worthwhile, but I would like to think that we could
improve on the details. In particular the positional-parameter
numbering looks a bit clunky and it would be nice to avoid run-time
parsing of the pattern expressions. I also note that the patterns look
like xpath epressions, but aren't.
Please tell us more about your proposal.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk