[xsd-users] constraint of expat using

Boris Kolpackov boris at codesynthesis.com
Wed Nov 15 23:21:02 EST 2006


Hi,

UCHIDA Hitoshi <uchida.hitoshi at canon.co.jp> writes:

> > What are the reasons that make you prefer Expat over Xerces-C++?
>
> I care about the library size and the parsing speed
> though I'm mainly looking into the various posibilities of XSD.

It is true that Expat is a smaller (footprint-wise) and faster XML
parser. At the same time Expat is a fairly minimal parser supporting
only SAX and a handful of character encodings while Xerces-C++ is
probably the most comprehensive XML parser for C++ there is. Here
are some of the features that you can find in Xerces-C++ but not in
Expat:

 - Supports for DOM

 - Supports for DTD and XML Schema validation

 - Supports for a large number of character encodings both internally
   and via external Unicode libraries

 - Support for network access


The C++/Tree mapping is designed to work from DOM and provides tight
integration with the Xerces-C++ DOM at certain points (e.g., the
ability to associate DOM nodes with tree nodes and constructors that
accept DOMElement and DOMAttr). While such tight integration may be
viewed as a bad thing, you would be surprised how many people find
the features that such integration provides useful, especially while
handling typeless content (mixed content, any/anyAttribute, etc.),
partial content, and integration with third-party libraries that
expose their internal data model as Xerces-C++ DOM (e.g., Berkeley
DB XML database).


As you can see, adding Expat as another underlying XML parser to the
C++/Tree mapping would not be a trivial task. Rather we are planning
to leave the existing C++/Tree mapping as is (i.e., comprehensive,
feature-rich, with extra benefits from the close integration with the
underlying XML parser) and design and implement a new, light-weight (to
the point that it is suitable for embedded systems), hybrid mapping that
will use Expat as the underlying parser and provide most of the features
you can find in the existing C++/Tree and C++/Parser mappings.

Let me know if you would be interested in such a new mapping and I will
send you a high-level overview of the design.


hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20061116/9cc6cbc4/attachment.pgp


More information about the xsd-users mailing list