XML Schemas Example 1


<xsd:schema xmlns:xsd="http://www.w3.org/2000/08/XMLSchema">

  <xsd:element name="purchaseOrder" type="PurchaseOrderType"/>

  <xsd:element name="comment" type="xsd:string"/>

  <xsd:complexType name="PurchaseOrderType">

   <xsd:sequence>

   <xsd:element name="shipTo" type="USAddress"/>

   <xsd:element name="billTo" type="USAddress"/>

   <xsd:element ref="comment" minOccurs="0"/>

   <xsd:element name="items" type="Items"/>

</xsd:sequence>

<xsd:attribute name="orderDate" type="xsd:date"/>

</xsd:complexType>

...

</xsd:schema>