初学schema---schema命名空间理解

初学schema---schema命名空间理解

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" <!-- schema的命名空间 -->
         targetNamespace="http://www.example.org/01"  <!-- 在其他文件中要引用该schema文件就要在schemaLocation中引入它 -->
         xmlns:tns="http://www.example.org/01" <!-- 在自己中引用自己定义的元素时使用的 命名空间 -->
         elementFormDefault="qualified">
         
         <complexType name="mytype"></complexType>
         
         <element name="tt" type="tns:mytype"></element> <!-- 在自己中引用自己定义的元素时使用的 命名空间 -->
</schema>

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/zhao3587717/article/details/85233740
今日推荐