[xsd-users] custom xml parser?

Boris Kolpackov boris at codesynthesis.com
Wed Mar 23 09:25:59 EDT 2011


Hi,

dv <dv7777 at gmail.com> writes:

> I would like to use the C++/Tree mapping.

C++/Tree is integrated pretty tightly with Xerces-C++ (there are a
number of benefits to such tight integration, including representation
of wildcard/mixed content as DOM fragments, XPath support, etc). Plus,
C++/Tree relies on the underlying XML parser for XML Schema validation
so if your parser does not support it, then you will only be able to
parse in non-validating mode.

On the other hand, the C++/Hybrid mapping in XSD/e, which is similar
to C++/Tree, doesn't know anything about the underlying XML parser.
It is all handled by C++/Parser which in turn uses customized Expat
parser and performs XML Schema validation in the generated code. It
should be quite easy to customize the XSD/e runtime to use a parser
other than Expat. Pretty much all teh parser-specific logic is in
the libxsde/xsde/cxx/parser/expat/ directory with just a few
references from the rest of the C++/Parser runtime. This would be
very easy to change. If you would like to give it try and need
help, feel free to ask on the xsde-users mailing list.

Boris



More information about the xsd-users mailing list