在 XSD(XML Schema)中设置 XML 的属性顺序 [英] Setting the order of attributes for XML in XSD (XML Schema)

查看:19
本文介绍了在 XSD(XML Schema)中设置 XML 的属性顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以从Schema中设置XML中属性的顺序吗?

Is there any way to set the order of attributes in XML from Schema?

推荐答案

属性顺序无关紧要,根据 XML 推荐:

请注意,开始标签中属性规范的顺序或空元素标签不重要.

Note that the order of attribute specifications in a start-tag or empty-element tag is not significant.

因此,XML Schema 没有提供约束属性排序的方法.

一般来说,XML 建议都会认为属性排序无关紧要,但请参阅 XML 规范化建议Canonical XML Recommendation 如果您的应用程序需要属性排序.

In general, the XML recommendations will all consider attribute ordering to be insignificant, but see the section on attribute processing in the XML Normalization Recommendation or the Canonical XML Recommendation if your application has a need for attribute ordering.

这篇关于在 XSD(XML Schema)中设置 XML 的属性顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆