Do XML parsers tell the difference between xsi:nil=“true” and omitted elements?
问题 Are XML parsers/deserializers in general able to tell the difference between nillable elements explicitly set to null and optional elements that are left out? Assume that we have the following complex type: <complexType name="NiceType"> <sequence> <element name="niceElem" nillable="true" type="int" minOccurs="0" /> </sequence> </complexType> Element explicitly set to null (example 1): <niceType> <niceElem xsi:nil="true"/> </niceType> Element omitted (example 2): <niceType> </niceType> Would