init
This commit is contained in:
26
day01/books1.xsd
Normal file
26
day01/books1.xsd
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
schema约束文件的根标签必须是schema
|
||||
目标命名空间:类似java中的包名,用来在执行的xml中来导入约束文件
|
||||
targetNamespace="http://www.example.org/books"
|
||||
-->
|
||||
<schema xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://www.emample.org/books"
|
||||
elementFormDefault="qualified">
|
||||
<element name="books">
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element name="book" maxOccurs="unbounded">
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element name="name" type="string"></element>
|
||||
<element name="autor" type="string"></element>
|
||||
<element name="price" type="string"></element>
|
||||
</sequence>
|
||||
<attribute name="address"></attribute>
|
||||
</complexType>
|
||||
</element>
|
||||
</sequence>
|
||||
</complexType>
|
||||
</element>
|
||||
</schema>
|
||||
Reference in New Issue
Block a user