[xsd-users] cxx-parser: run time difficulties with KML21.xsd

Boris Kolpackov boris at codesynthesis.com
Wed Jun 2 09:05:45 EDT 2010


Hi David,

David White <dawhite32 at gmail.com> writes:

> No, and yes.  At the bottom of this email is a sample kml file.

Which is invalid per the KML schema. Just add the following attributes
and try it without the dont_validate flag:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://earth.google.com/kml/2.1 kml21.xsd"


> I understand that this error is raised when the parser does not have 
> or know the full path to the schema.  If I add to the 
> xml_schema::flags::dont_validate to the parse function, the app doesn't 
> throw, but doesn't do anything either, I presume, because of a lack of 
> polymorphic-aware code - right? 

Yes, that's correct.


> A simple, kml21-pimpl example would be appreciated.

I have modified the test driver to add support for polymorphism:

http://www.codesynthesis.com/~boris/tmp/kml21-pdriver.cxx

For more information on how I did it, see this post:

http://www.codesynthesis.com/pipermail/xsde-users/2009-November/000186.html


> The reason for using cxx-parser is due to the lightening speed it 
> offers over cxx-tree for extremely large xml files.  I understand 
> cxx-tree offers a more simple approach to parsing xml files, but 
> the speed at which I can parse files using cxx-parser is second 
> to none.

Yes, I guess this is a valid reason. The alternative would be to
use XSD/e and its C++/Hybrid mapping:

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

Boris



More information about the xsd-users mailing list