当前位置: 代码迷 >> Web前端 >> 怎样写XSD资料4
  详细解决方案

怎样写XSD资料4

热度:90   发布时间:2013-04-05 10:24:33.0
怎样写XSD文件4
根<myElement hello="string必填" world="string选填">


<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:attributeGroup name="myAttributeGroup">
<xs:attribute name="hello" type="xs:string" use="required"/>
<xs:attribute name="world" type="xs:string" use="optional"/>
</xs:attributeGroup>
<xs:element name="myElement">
<xs:complexType>
<xs:attributeGroup ref="myAttributeGroup"/>
</xs:complexType>
</xs:element>
</xs:schema>
  相关解决方案