如何在 xml-node 中引用 xsd-Schema [英] How to reference an xsd-Schema in an xml-node

查看:38
本文介绍了如何在 xml-node 中引用 xsd-Schema的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将对 XML 架构 (xsd) 的引用放入 XML 节点.它应该是这样的:

I need to put a reference to an XML-schema (xsd) into an XML-node. It should look like this:

<root>
  <!--reference to xsd-->
  <child1/>
  <child2/>
</root>

在注释的位置应该是指向某个模式的链接.有没有标准的方法来做到这一点?

At the place of the comment should be a link to some schema. Is there a standard way to do this?

推荐答案

这是一个很好的link 开始阅读有关在 XML 文档中引用架构文档的信息;它为您提供了用于此目的的两个属性 xsi:noNamespaceSchemaLocation 和 xsi:schemaLocation 的描述.

This is a good link to start reading about referencing schema documents in XML documents; it gives you a description of the two attributes, xsi:noNamespaceSchemaLocation and xsi:schemaLocation used for this purpose.

这篇关于如何在 xml-node 中引用 xsd-Schema的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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