Condividi tramite


Nullable and XxxSpecified

Just read this on Simon Fell's site. We've added support for xs:nillable=”true” by mapping such elements to System.Nullable<T>. However if you give us this element declaration:

<xs:element name=”foo” type=”xs:dateTime” minOccurs=”0” nillable=”true”/>

We need to give you a way in code to know whether the element appeared and was set to nil, i.e.

<foo xsi:nil=”true”/>

or didn't appear at all (since minOccurs=”0”). Hence we do still use the XxxSpecified bit for elements with minOccurs=”0”.

Comments

  • Anonymous
    July 22, 2004
    The comment has been removed