Nil Values


 

Nil Values

This is an optional attribute. Its value can be set to true or false. Its default value is false. It defines that an element can be assigned null value explicitely.

This is an optional attribute. Its value can be set to true or false. Its default value is false. It defines that an element can be assigned null value explicitely.

Nil Values

This is an optional attribute. Its value can be set to true or false. Its default value is false. It defines that an element can be assigned null value explicitely. If it is set to true then the attribute value can be set to null.

For example, "detail" is the element which is of string type and its "nillable" attribute is set to true. It means "detail" element can have nil value.
<xs:element name="detail" type="xs:string" nillable="true"/>

Due to setting the nillable attribute of element to true, the nil value can be set for the elements by setting the xsi:nil attribute to true.

<detail xsi:nil="true"/>

Ads