[xsd-users] Default values of elements that use enumerated types
Boris Kolpackov
boris at codesynthesis.com
Thu Dec 10 08:37:49 EST 2015
Hi Tony,
Tony McConnell <amnw14545 at googlemail.com> writes:
> When I create some XML that has '<precipitation></precipitation>', xmllint
> is happy, but the generated code produces an 'unexpected enumeration'
> exception.
>
> Should XSD support default element values, or is this some problem with the
> underlying xerces-c parser?
This should work, provided you did not disable validation at the Xerces-C++
level (since, unlike for attributes with default values, for elements XSD-
generated code relies on the underlying parser to "expand" the default
values). What is the exact error that you are getting and what do you do
to parse this XML (i.e., show the relevant C++ fragment)?
Boris
More information about the xsd-users
mailing list