[xsd-users] why no expat support for cxx-tree?

Boris Kolpackov boris at codesynthesis.com
Tue Apr 20 15:43:34 EDT 2010


Hi James,

James Sutton <jrs at jmsutton.co.uk> writes:

> I am attempting to use xsd to parse MusicXML. Xerces isn't available 
> on the target platform, so I cannot use cxx-tree. Is there any hidden
> option to get cxx-tree to support expat?

No, C++/Tree only works with Xerces-C++. There are multiple reasons
for that, the primary ones being the use of the XML Schema validation
and support for some advanced featured that require the underlying
DOM representation.


> This is a big schema and it's going to take a lot of work to reproduce 
> an in-memory image from cxx-parser which would be available immediately
> from cxx-tree.

There is another problem with MusicXML and C++/Tree that got to do
with element ordering. See the thread starting from here for details:

http://www.codesynthesis.com/pipermail/xsd-users/2008-May/001696.html

There is however another option that addressed both of these problems
(i.e., the lack of Xerces-C++ support and element ordering) which is 
to use the C++/Hybrid mapping in XSD/e (or mobile/embedded systems
variant of XSD):

http://www.codesynthesis.com/products/xsde/

C++/Hybrid is similar to C++/Tree in that it delivers the data as
an in-memory object model. However, it is more lighter-weight and
doesn't have any external dependencies.

Boris



More information about the xsd-users mailing list