XML Schema

最常用的类型是:

  • xs:string
  • xs:decimal
  • xs:integer
  • xs:boolean
  • xs:date
  • xs:time

1. 文件格式

<xs:element name="xxx", type="YYY"/>

// 法国

<xs:element name="color" type="xs:string" default="red"/>

<xs:element name="color" type="xs:string" fixed="red"/>

<xs:attribute name="xxx", type="yyy"/>

simpleType 元素定义一个简单类型

restriction

<xs:element name="age">

<xs:simpleType>
  <xs:restriction base="xs:integer">
    <xs:minInclusive value="0"/>
    <xs:maxInclusive value="120"/>
  </xs:restriction>
</xs:simpleType>

</xs:element> 

http://w3school.com.cn/schema/schema_schema.asp

原文地址:https://www.cnblogs.com/dirichlet/p/3274235.html