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 to tell the difference between example 1 and example 2 above? In other words, would you in an interoperable manner be able to combine both NULL representations - as in the example - in order to communicate different shades of NULL?