SOAP/REST Web 服务 XML 区分大小写
我只是怀疑我们用于基于 SOAP/REST 的 Web 服务的 XML 是否区分大小写?它到底是如何运作的?
告诉我默认的肥皂信封以及有效负载 XML。
I just got a doubt whether the XMLs we are using for our SOAP/REST-based web services are case-sensitive or or not? How does it work exactly?
Tell me both for the default soap envelope as well as for payload XMLs.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
SOAP
是 XML 语言的特定实例。因此,它遵守 XML 的所有规则。
这些规则之一是
XML
区分大小写。因此
SOAP
也区分大小写。REST
也是如此SOAP
is a specific instance of an XML language.As such, it adheres to all the rules of XML.
One of these rules is that
XML
is case-sensitive.Therefore
SOAP
is case sensitive as well.Same is true for
REST
XML 始终区分大小写;它是由 W3C 定义的(请参阅“匹配”的定义,其中表示不执行大小写折叠)。 SOAP 将 XML 用于信封和有效负载,因此根据定义它们是区分大小写的。
(请注意,这与 HTML 不同,HTML 对于元素和属性名称不区分大小写。这是因为 HTML 构建于 SGML 之上,SGML 本身是 XML 的复杂得多的前身。)
XML is always case-sensitive; it's defined that way by the W3C (see the definition for “match” where it says that no case folding is performed). SOAP uses XML for both envelope and payload, so those are by definition case-sensitive.
(Note that this is different from HTML, which is case-insensitive for element and attribute names. That's because HTML is built on top of SGML, itself a much-more-complex predecessor to XML.)