Boost logo

Boost :

From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2003-05-30 08:08:44


Vladimir Prus wrote:

>>What is wrong with Xerces-C++ library
>>(http://xml.apache.org/xerces-c/index.html) ?
>
>
> Probably, the fact that its tarball is comparable in size to the entire
> Boost?

And, related, performance of the libxml2 is far better then any
compotitor. Of course, it remains to be shown that my C++ wrapper
doesn't destroy that :-)

> Another thing is that it's not a big friend of C++ standard library.
> For example, it does not use std::string, but its own XMLString class.

indeed. As I said, 'the' DOM and SAX APIs are pretty 'Java-like'. There
is no standardized C++ API for it. While one can 'naturally' map the
interfaces to C++, but that doesn't take C++ idioms and practices into
account.

As to the string type used, it has to be a type that can support
non-ASCII encodings. While one can provide such a string class with the
library (xerces has taken that road), I chose to parametrize the whole
library with the string type, i.e. libxml2 internally uses 'char *' (and
stores strings in utf-8, so the typical C semantics of 'null terminated
string' is still valid), and I provide a string template parameter
together with a converter trait that maps between the string type and
the internal char *...

> Going back to original post, I wonder how the proposed library differers
> from http://gmetadom.sourceforge.net/, which is wrapper on gdome, which is
> wrapper on libxml.

all those 'g libraries' are deeply rooted in Gnome, meaning they drag
in a number of dependencies (glib, gdome, etc.).

As libxml2 itself is a stand-alone library, there is no factual
dependency (even though it is declared to be the 'Gnome XML library').

Regards,
                Stefan


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