[xsd-users] Support for other than xercesc parser

Boris Kolpackov boris at codesynthesis.com
Fri May 16 09:24:32 EDT 2008


Hi Suresh,

Suresh <sureshbabu.kps at wipro.com> writes:

> Does XSD support this parser? If not is there any work around to use this
> parser with XSD?

The C++/Tree mapping can only be used with Xerces-C++ DOM. C++/Parser
supports Xerces-C++ and Expat out of the box and other parsers can
be used as long as you can adapt them to a SAX-like interface.

In case of the XML parser that you mentioned, it uses a DOM-like
representation so while it should be possible to use it with
C++/Parser, it will be quite awkward and inefficient. Expat in
this case is a much better choice as a light-weight (and conforming,
see below) XML parser.


> Instead we are planing to use a light weight parser -
> http://www.applied-mathematics.net/tools/xmlParser.html.

I took a look and here are a few comments to the statements
made on that page:


> Let's look at the well-known Xerces C++ library: the complete
> library is 53 MB!

This is not true. Optimized Xerces-C++ library without debug
information (which is what will be distributed with your
application) is less than 2MB in size.


> DTD's or XSD's informations are ignored
> Limited Support for character entities

This means this is a non-compliant according to the W3C XML spec
parser that is not capable of handling all valid XML documents.
Unless you control the production of XML that you are planning
to parse (and thus can make sure it won't contain any "unsupported"
constructs), using this parser in a production application is
asking for trouble.

Boris




More information about the xsd-users mailing list