What does i:nil=“true” mean?

笑着哭i 提交于 2019-11-28 07:55:10

This means FirstName is null

<FirstName i:nil="true" />

This means FirstName = ""

<FirstName />

Assumption made on FirstName is of string type.

Maybe i:nil actually means xsi:nil, this means that the FirstName element is empty, i.e. does not have any content -- not even "". It refers to the nillable property in XML Schema.

nil is an attribute, defined in the i namespace. For this FirstName node, the attribute has the value true.

It's similar to this, just with different names and values:

<form name="test">...

Here, form is the name of the node, similar to FirstName from your code, and name is an attribute with a value of "test", similar to your attribute nil with a value of "true".

What this means depends on the application reading the xml document.

If I were to venture a guess, I'd say that this looks like part of a xml document defining some kind of schema, and that the FirstName field can have a NULL or nil value, meaning empty, or unknown.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!