All the generators are absolutely terrible.
XSD describes a class hierarchy in which classes contain subclasses, which may contain other subclasses and all you want to do is represent it in the same way.
For example if this is your schema:
<xs:element name="shipto">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="address" type="xs:string"/>
<xs:element name="city" type="xs:string"/>
<xs:element name="country" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
You'd want to produce something like:
class shipTo
{
private:
string name;
string address;
string city;
string country;
public:
set_Name();
get_Name();
...
}
You're not going to find it. The closest thing I have found is xjc, which is for Java.
You'd expect something as BASIC as this functionality would exist, but I haven't found it yet, and yes, I have used Altova XML-Spy. I'm seriously surprised anybody would suggest this as a code generator. Its generated code is absolutely awful.
I'm writing a lex/bison parser to do this for my project because all the tools I've been able to find so far produce fairly horrible code. Altova has a 30 day trial period, if you don't believe me, try it. It is easier to write a lex/bison parser for my XSD than it is to use a $500 professional code package that produces a terrible class representation.
I can't believe people make use of XML in C++ because the tools for it are terrible.