Sample Schema
The following schema XML is a sample Order structure.
<?xml version="1.0"?>
<xsd:schema targetNamespace="order"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="Address" type="Address"/>
<xsd:element name="Customer" type="Customer"/>
<xsd:element name="CustomerID" type="CustomerID"/>
<xsd:element name="Item" type="Item"/>
<xsd:element name="LineItem" type="LineItem"/>
<xsd:element name="LineItems" type="LineItems"/>
<xsd:element name="Order" type="Order"/>
<xsd:complexType name="Address">
<xsd:sequence>
<xsd:element name="Street" type="xsd:string"/>
<xsd:element name="City" type="xsd:string"/>
<xsd:element name="State" type="xsd:string"/>
<xsd:element name="PostalCode" type="xsd:string"/>
<xsd:element name="Country" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Customer">
<xsd:sequence>
<xsd:element name="CustomerID" type="CustomerID"/>
<xsd:element name="Address" type="Address"/>
<xsd:element name="Contact" type="xsd:string"/>
<xsd:element name="Phone" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CustomerID">
<xsd:simpleContent>
<xsd:extension base="xsd:string"/>
</xsd:simpleContent>
<xsd:attribute type="xsd:string" use="required" name="number"/>
<xsd:attribute type="xsd:string" use="required" name="name"/>
</xsd:complexType>
<xsd:complexType name="Item">
<xsd:sequence>
<xsd:element name="Description" type="xsd:string"/>
<xsd:element name="UnitPrice" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute type="xsd:string" use="required" name="number"/>
</xsd:complexType>
<xsd:complexType name="LineItem">
<xsd:sequence>
<xsd:element name="Quantity" type="xsd:integer"/>
<xsd:element name="Item" type="Item"/>
</xsd:sequence>
<xsd:attribute type="xsd:integer" use="required" name="number"/>
</xsd:complexType>
<xsd:complexType name="LineItems">
<xsd:sequence>
<xsd:element name="LineItem" type="LineItem" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Order">
<xsd:sequence>
<xsd:element name="Customer" type="Customer"/>
<xsd:element name="OrderDate" type="xsd:string"/>
<xsd:element name="LineItems" type="LineItems"/>
</xsd:sequence>
<xsd:attribute type="xsd:string" use="required" name="number"/>
<xsd:attribute type="xsd:string" name="status"/>
</xsd:complexType>
<xsd:element name="UnitPrice" type="xsd:string"/>
</xsd:schema>
Last modified date: 01/29/2015