Boost logo

Boost :

From: Doug Gregor (dgregor_at_[hidden])
Date: 2005-11-01 14:36:11


On Nov 1, 2005, at 1:26 PM, Gennadiy Rozental wrote:
> Scenario 1: I prefer parse documents
> Scenario 2: I prefer parse documents
> Scenario 3: I prefer parse documents
> Scenario 4: I prefer parse documents

That's a lot of parsing.

> I could list a lot of different usage schemes with different
> tradeoffs.
> Eventually it bound to affect XML parser interface in regards to
> Unicode

The parsing interface in an XML library will be a handful of functions,
with a single overloaded name, that take in
iterators/streams/filenames/URLs/whatever and produce an XML document.
In user code, parsing will take about 5 lines of code:

try {
   doc = parse_xml(input);
   process_xml_doc(doc);
} catch (xml_input_error&) {
   // report failure
}

A library should focus on what people really spend their time on. For
XML, this is navigating, traversing, and manipulating XML documents,
not parsing. Get a solid, usable interface for that and we'll have a
Boost XML library. Leave XML parsing to the underlying library (Stefan
wisely chose libxml2) and revisit it later for those few users that
need the full parsing expressivity that you describe.

        Doug


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk