C# と .Net 4.0 の使用
次のような生成されたスキーマがあります。
<xsd:element name="EstimatedDate" minOccurs="0" nillable="true" default="1900-01-01T00:00:00">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:dateTime">
<xsd:attribute name="origVal" type="xsd:dateTime" use="optional" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
オブジェクトを null 値でシリアル化すると、次のようになります。
<EstimatedDate xsi:nil="true" />
しかし、デシリアライゼーションを取得しています。
XML 仕様を見ると、nillable プロパティとデフォルト プロパティが相互に排他的であることがわかりませんが、nillable であるがデフォルト プロパティを持たない他の dateTime XML 型は正しく機能します。