You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that the generated code for nullable property getter only inspects if the element exists. It fails when the element exists with attribute "xsi:nil"=true.
When accessing the generated createDate property, it throws, as it finds the element, and tries to parse the empty value to DateTime.
As XDocument/XElement are not schema-aware, I'm not even sure which approach for solving this will be more appropriate - inspecting for the nil=true, or using the XElement.IsEmpty to detect the null value.
The text was updated successfully, but these errors were encountered:
It appears that the generated code for nullable property getter only inspects if the element exists. It fails when the element exists with attribute "xsi:nil"=true.
Example:
xsd:
<xsd:element name="createDate" type="xsd:dateTime" minOccurs="0" nillable="true" />
Incoming xml:
When accessing the generated
createDate
property, it throws, as it finds the element, and tries to parse the empty value to DateTime.As XDocument/XElement are not schema-aware, I'm not even sure which approach for solving this will be more appropriate - inspecting for the nil=true, or using the XElement.IsEmpty to detect the null value.
The text was updated successfully, but these errors were encountered: