[xsd-users] Problem with substition groups
Boris Kolpackov
boris at codesynthesis.com
Wed Nov 29 03:30:43 EST 2017
FLACHET Nicolas <Nicolas.FLACHET at cstb.fr> writes:
> The parser works fine as a xml reader/writer, however there is no
> attribute generated with constructor and getter/setter for this
> element, so if in my code I can't do :
>
> ElementTest anElement = new ElementTest ;
XSD does not generate classes (I assume you meant "class" not
"attribute" above) for elements, only for types. So you need to
use ElementTest's (potentially dynamic) type in the above code
fragment.
It is clear to me that you don't understand how XSD maps XML
Schema constructs (types, elements) to C++ constructs (classes,
functions). So I would suggest that you read carefully through
the getting started guide:
https://codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/
Boris
More information about the xsd-users
mailing list