Boost logo

Boost :

From: Andreas Pokorny (andreas.pokorny_at_[hidden])
Date: 2005-11-07 11:27:11

Hi there,
Stefan Seefeld recently presented his set of Dom classes. Personally I
do not have any need for a DOM API. To focus the discussion on other
APIs I started this new thread (and also because I could not find a
good entry point in the previous disucussions). Last time I had to
process XML I wrote my own wrapper on top of SAX, which forwarded higher
level events to xml-unaware structures. The model served well to directly
map a fixed XML-format to C++ structures (also XML writing was supported).
  The wrapper that forwarded all SAX events to the datastructures was
generated from a single C++ expression, or several if recursion was
required. I adopted a lot of spirits techinques to make it look nice.
There were no intermediate data structures.

In retrospective I also dislike my attempt, although it was better
than working on xml document classes. It only worked with full xml
documents, no partial parsing was supported. Furthermore it required a
nearly direct mapping of xml elements to datastructures, different
use cases which do not include a mapping of xml<->c++ werent considered.

I currently do not need to fiddle with XML, 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)
 * xml path / query like api to fastly grep for certain subtrees or
  elements of the xml
 * direct mapper of c++ structures to a certain format, so a kind of
  xml serialization,

As you can see my view on XML is very limited, it boils down to a
flexilbe form of reading XML.

Andreas Pokorny

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