[xsde-users] Expat replacement?

Boris Kolpackov boris at codesynthesis.com
Mon Apr 18 09:54:50 EDT 2011


Hi,

dv <dv7777 at gmail.com> writes:

> is Expat hard-coded into XSD/e?

Yes, though it is fairly isolated. So it shouldn't be very hard to
customize the XSD/e runtime (libxsde) to use an alternative SAX-
like parser.

The Expat-specific code is in the libxsde/xsde/cxx/parser/expat/
directory. You will need to provide a similar functionality based
on your parser. Other that that, there is just a handful of
references in libxsde/xsde/cxx/parser/{error.?xx, exceptions.?xx,
context.hxx}. The easiest way to integrate another parser would
probably be to make it "pretend" to be Expat. That is, place it
into libxsde/xsde/cxx/parser/expat/, call the files the same as in
the Expat implementation, and provide the types and functions that
are expected outside (those are just: xml_error type, xml_error_text()
function, and XML_Parser type). Should be fairly easy.


> For some internal projects we'd like to use RapidXML

You know if it not a real XML parser[1], right?


> of course validation would not be an option.

You can still have XML Schema validation if you want to, as long
as the parser does the well-formedness checking.

[1] http://www.codesynthesis.com/~boris/blog/2008/05/19/real-xml-parser/

Boris



More information about the xsde-users mailing list