[xsd-users] Enumerated strings parser generation

Boris Kolpackov boris at codesynthesis.com
Fri Nov 4 09:39:36 EDT 2016


Hi Chris,

Chris Gagneraud <chgans at googlemail.com> writes:

> C++/Tree does in-memory parsing of the whole document, which is a
> no-go for me as some XML file can be really huge (go some segfault on
> Windows due to that),

You can do partially in-memory/partially streaming processing with
C++/Tree. See the 'streaming' example.


> ... plus I liked the idea of having my own object [...] implement a
> second stage "translator" that would convert the XSD/CXX structures
> to the a more domain-friendly model...

Probably the most reasonable approach for non-trivial schemas.


> To give you a bit more context, another problem I have to face is that
> existing software that generates these XML files are not always XSD
> compliant, not by much but still. My work around so far was to modify
> the XSD to relax it a bit [...]

Either that or disable validation and then "fix-up" the XML at the DOM
level before handing it off to C++/Tree. There is no magic solution for
this problem.


> Maybe I should give a go at XSD/e?

You can try, though again for complex schemas it will be harder to use
than C++/Tree.


> Thanks for writing this great piece of SW and for making it available
> to the open-source community.

You are welcome. Hope you can make it work for your case.

Boris



More information about the xsd-users mailing list