Hi there libxml++ doesn't have a SAX2 API, which is really the baseline API for stream parsing these days. The most important thing it buys the user is support for XML namespaces. The question is how to implement this. libxml has no direct support for namespaces in its SAX API. The file SAX.c in libxml is an actual implementation of namespaces, so some of that code could be used. It is possible to write a SAX2 API by layering on the SAX one. http://www.saxproject.org/?selected=sax2 shows the changes from SAX1 to SAX2 (read from the bottom up). Aside from namespace support the major feature additions are SAX filters, which can sit in the event stream and filter data, and "features and properties", mechanisms for controlling parser behaviour. There's already a BSD-licensed wrapper for libxml that provides SAX2, http://www.jezuk.co.uk/cgi-bin/view/arabica, but of course that's not GPL. Perhaps the most useful starting point could be the ParserAdapter class -- see http://www.saxproject.org/apidoc/org/xml/sax/helpers/ParserAdapter.html This is a class that layers on a SAX parser to make it a SAX2 one. The license says "public domain" so I've no idea what the licensing status of a direct port to C++ would be. http://www.saxproject.org/?selected=pd -- Edd
Attachment:
signature.asc
Description: This is a digitally signed message part