I'm embarking on a c# based project in which I would like to make use of a
lot of XML including database access and using hte xml and .net tools as a
coding shortcut.
What I'm trying to understand at the moment is how to use xsd.exe and result
..cs files to mange the xml.
First question.
My XSD includes <sequence>s which have > 1 value. the cs produced renders
this as a single instance, though if I change this to an array (manually)
the deserialization works as expected (nice!). How can I tell xsd it SHOULD
be an array (I've tried setting maxOccurs, but this seems to make no
difference).
Second question.
I want some of the attributes (and elements for that matter) to be
mandatory. Specifically, I would like an exception to be throw during
deserialisation (oops sorry about the 's' chaps - I speak British English as
a first tongue - the 'z' thing takes some getting used to!) if an attribute
is not present. How do I do this?
Equally, I would like an exception thrown if an attribute or element NOT
specified in the XSD occurs.
In both cases, I'm kind of hoping I can do it without having to make
post-xsd.exe changes to the source.
Look forward to feedback!
iain