Home Tutorial Xml Nil Values

 
 

Nil Values
Posted on: November 22, 2010 at 12:00 AM
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"/>

Related Tags for Nil Values:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.