I got a strange behaviour with the XSD generator I can\'t really explain. I got an XSD like this:
Set minOccurs="1" where element is nillable. For example:
<xs:element name="StageOnDemand" type="xs:boolean" nillable="true" minOccurs="1" />
the bool
attribute means the related attribute should be serialized.
e.g.
If the bool
MinDuration_100msSpecified
is set to false
, and you set the MinDuration_100ms
to be 300
, when you use XmlSerializer
to serialize the object, the MinDuration_100ms
attribute won't be serialized.
This feature can save the serialized xml file to be minimal.