Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does i:nil="true" mean?

Tags:

null

xml

xml-nil

I have an xml and it has nodes with i:nil="true" in it. What does that mean?

For example:

<FirstName i:nil="true" /> 

Does that mean something different than:

<FirstName /> 

If so, what is the difference?

like image 937
dtc Avatar asked Jan 20 '09 23:01

dtc


People also ask

What does nil mean in XML?

Synopsis. The xsi:nil attribute indicates that a certain element does not have a value or that the value is unknown. This is not the same as having a value that is zero or the empty string.

How do you give a null in XML?

Ways to represent a null value In an XML document, the usual way to represent a null value is to leave the element or attribute empty. Some business messages use a special value to represent a null value: <price>-999</price> . This style of null representation is supported by the DFDL and MRM parsers.


1 Answers

This means FirstName is null

<FirstName i:nil="true" /> 

This means FirstName = ""

<FirstName /> 

Assumption made on FirstName is of string type.

like image 73
Ray Lu Avatar answered Oct 01 '22 09:10

Ray Lu