schema入门

解释

<?xml version="1.0" encoding="UTF-8"?>
<schema

xmlns="http://www.w3.org/2001/XMLSchema"    --schema标准的命名空间,没有加“:”表示默认的命名空间,默认的命名空间只能有一个,可以直接访问元素
targetNamespace="http://www.example.org/01"  --该schema名称空间,其他访问该schema必须将该地址加入到对应的文件中去
xmlns:tns="http://www.example.org/01" --加:表示增加命名空间,后面加增加schema的引用,该处引用自己
elementFormDefault="qualified">
</schema>

在xml中引用schema

另一种引用方式

扫描二维码关注公众号,回复: 4983780 查看本文章

猜你喜欢

转载自blog.csdn.net/qq_32367137/article/details/86507602