[xsd-users] parser xsd file recursively

Li, Xiaoxing (GE Global Research) lixia at ge.com
Thu Apr 26 12:51:39 EDT 2012


Hello, Boris

This worked perfectly, thanks a lot!

Best

Ginger

-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com] 
Sent: Thursday, April 26, 2012 12:23 PM
To: Li, Xiaoxing (GE Global Research)
Cc: xsd-users at codesynthesis.com
Subject: Re: [xsd-users] parser xsd file recursively

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