
On Tue, April 18, 2006 8:59, Boris Kolpackov said:
Hi James,
writes: I may just be showing my ignorance here, but how do people feel about Xerces? Especially given that it's written in C++.
Here is what I know about Xerces-C++ from experience:
- Out of all mentioned parsers (expat, libxml2, tinyxml) it is the only validating parser that supports both DTD and XML Schema. I think libxml2 supports only DTD and the other two do not support any validation.
- Fairly complete support for advanced XML features, e.g., namespaces, entity references, CDATA, etc.
- Extensive support for character encodings.
- Supports DOM and SAX in one package.
- C++ API. It is sometimes quite ugly, though.
- Fairly portable.
(Note: I'm trying to install Xerces now on Solaris, and it isn't easy.)
I didn't find the installation any more difficult than say... boost ;-).
hth, -boris
-- Boris Kolpackov Code Synthesis Tools CC http://www.codesynthesis.com Open Source Cross-Platform C++ XML Data Binding
From my experience working with Xerces 2.6 and 2.7 I can complain about extremely bad documentation. Sometimes I had to debug though xerces source code to understand how it works. In some cases where documentation stated that the particular DOM Interface is implemented NotImplementedException was thrown. The most disturbing thing is that you can not rely on documentation and in most cases documentation even does not state if this particular interface might throw an exception which can lead to unpleasent result at runtime...
You also need to write a wrapper class around Xerces XMLCh type and static XMLString member functions, because these functions are not exception safe in terms of RAII, e.g. //pre initialization here XMLCh* xmlStr=XMLString::transcode("some string"); //some code //some exception XMLString::release(xmlStr); //never reached => memory leak All document nodes were belonging to a document and you had to explicitly transform the ownership or release them which is also more or less C style programming... I always had a feeling to program C with C++ features... My suggestion would be if you can select something else choose another library... At some of the boost pages I found a reference to XiMoL project... This project seems to be a nice alternative to Xerces C. I do not know which features do you need... With Kind Regards, Ovanes Markarian