常见XSD问题

时间:2025-01-09 15:04:56

<

xs:elementname="status">

  <

xs:complexType>

    <

xs:sequence>

    <

xs:elementname="created_at"type="xs:string" />

    <

xs:elementname="id"type="xs:unsignedLong" />

    <

xs:elementname="text"type="xs:string" />

    <

"maxOccurs="unbounded"processContents="skip"/>

    </

xs:sequence>

  </

xs:complexType>

</

xs:element>

<xs:all>表示子节点顺序可以任意
<xs:all>
      <xs:element name="firstname" type="xs:string"/>
      <xs:element name="lastname" type="xs:string"/>
</xs:all>

<xs:attributename="type"type="xs:string"use="required" />

<xs:anyAttributeprocessContents="skip"></xs:anyAttribute>