Monday, April 2, 2012

Nullable int in Xml Schema

If you want to be able to submit something like


< Counter1 >0< / Counter1 >
< Counter2 / >


then you need to define the following in the XSD file:


< xs:element name="Counter1" type="xs:integer" minOccurs="0" default="0" / >
< xs:element name="Counter2" type="xs:integer" minOccurs="0" default="0" / >

No comments: