minoccurs

Do XML parsers tell the difference between xsi:nil=“true” and omitted elements?

你。 提交于 2020-01-13 10:11:58
问题 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

Do XML parsers tell the difference between xsi:nil=“true” and omitted elements?

让人想犯罪 __ 提交于 2020-01-13 10:11:10
问题 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

Do XML parsers tell the difference between xsi:nil=“true” and omitted elements?

自古美人都是妖i 提交于 2019-12-05 11:14:29
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 parsers in general, such as JAX-B implementations or .NET alikes such as the XML module of WCF, be able