[xsd-users] parser xsd file recursively

Boris Kolpackov boris at codesynthesis.com
Thu Apr 26 12:23:07 EDT 2012


Hi Xiaoxing,

In the future please keep your replies CC'ed to the xsd-users mailing
list as discussed in the posting guidelines:

http://www.codesynthesis.com/support/posting-guidelines.xhtml

Li, Xiaoxing (GE Global Research) <lixia at ge.com> writes:

> Thanks so much for your prompt reply. I am fine with the way of
> generating a separate set of C++ files for each schema type. In fact I
> prefer this way to maintain the structure of my abstract classes.
> Otherwise I could simply write a script to import all the included xsd
> files into "all.xsd", and do the parsing into a super large c++
> file(this works). 
> 
> Now, as you suggested, I tried to do it in a *.xsd way, but there are
> some dependency between the files to be included, thus I am getting a
> lot of errors. Are there ways to go around this? Thanks again for your
> time.

If you are using the file-per-type mode, then you only need to compile
the top schema (e.g., all.xsd), not all the schemas. Try something like
this:

$ xsd ... --file-per-type all.xsd


Boris



More information about the xsd-users mailing list