i:nil="true" 是什么意思? 意思是?

发布于 2024-07-12 08:35:46 字数 208 浏览 12 评论 0 原文

我有一个 xml,其中有带有 i:nil="true" 的节点。 这意味着什么?

例如:

<FirstName i:nil="true" />

这是否意味着不同的东西:

<FirstName />

如果是,有什么区别?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

花桑 2024-07-19 08:35:46

这意味着 FirstName 为 null

<FirstName i:nil="true" />

这意味着 FirstName = ""

<FirstName />

对 FirstName 所做的假设是字符串类型。

This means FirstName is null

<FirstName i:nil="true" />

This means FirstName = ""

<FirstName />

Assumption made on FirstName is of string type.

绝不放开 2024-07-19 08:35:46

也许i:nil实际上意味着xsi:nil,这意味着FirstName元素为空,即没有任何强> 内容——甚至不是""。 它指的是 XML 模式中的 nillable 属性。

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.

孤独患者 2024-07-19 08:35:46

nil 是一个属性,在 i 命名空间中定义。 对于此 FirstName 节点,该属性的值为 true

它与此类似,只是名称和值不同:

<form name="test">...

这里,form 是节点的名称,类似于代码中的 FirstNamename 是一个值为“test”的属性,类似于值为“true”的属性 nil

这意味着什么取决于读取 xml 文档的应用程序。

如果我大胆猜测,我会说这看起来像是定义某种模式的 xml 文档的一部分,并且 FirstName 字段可以有 NULL 或 nil 值,即空,或未知。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文