本帖最后由 不可言 于 2014-7-18 19:56 编辑
约束代码如下:
- <?xml version="1.0" encoding="UTF-8" ?>
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.itheima.com"
- elementFormDefault="qualified">
- <xs:element name='书架' >
- <xs:complexType>
- <xs:sequence maxOccurs='unbounded' >
- <xs:element name='书' >
- <xs:complexType>
- <xs:sequence>
- <xs:element name='书名' type='xs:string' />
- <xs:element name='作者' type='xs:string' />
- <xs:element name='售价' type='xs:string' />
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:schema>
复制代码 |
|