[xsd-users] cxx-parser with --file-per-type

Boris Kolpackov boris at codesynthesis.com
Mon Nov 25 02:45:46 EST 2013


Hi Farhat,

Latrach, Farhat <Farhat.Latrach at sc.com> writes:

> For my case, the cxx-tree does not fit well my need as I still need to parse
> the whole tree and for such amount of objects it will be very complicated.

I am not sure what you mean by "complicated". IMO, handling a complex
schema with C++/Parser is much more complicated than with C++/Tree
since you have to implement parsers, connect them, etc.

Perhaps what you mean is that parsing a large XML document is not
practical because of the memory consumption, etc (this is #1 reason
to prefer C++/Parser over C++/Tree). In this case, take a look at
the 'streaming' example which shows how to implement streaming
parsing with C++/Tree.


> The problem is: I have many other included schemas in my root element
> for which I need to make the same way of linking and obviously I need
> to automate this. 
> 
> My questions:
> Is there a better way (or other compiling options) to generate a test
> driver taking into account automatically the root elements of included
> schemas (putting --root-element my_included_schema_root_element does
> not work)? 

As I explained in my previous email, C++/Parser was designed to handle
simple, "well designed" schema. It is not meant to handle complex
schema with include/import cycles, etc., simply because anyone who
decides to use C++/Parser with such a schema will quickly give up
because of the amount of work involved in implementing all the
parsers.

Boris



More information about the xsd-users mailing list