Skip to content

Instantly share code, notes, and snippets.

@jipengxiang
Created May 16, 2014 05:47
Show Gist options
  • Save jipengxiang/0d07cf888452838ebbd9 to your computer and use it in GitHub Desktop.
Save jipengxiang/0d07cf888452838ebbd9 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8" ?>
<customerList xmlns="http://tempuri.org/CustomerListSchema.xsd">
<customer>
<CompanyName>Jack The Trader</CompanyName>
<ContactName>Jack</ContactName>
<Email>Jack@hotmail.com</Email>
<Phone>99988002</Phone>
<ShipToAddress>
<Name>Jack Receiver</Name>
<Street>Jurong</Street>
<City>Singapore</City>
<State>Singapore</State>
<Zip>201800</Zip>
</ShipToAddress>
<BillToAddress>
<Name>Jack Sender</Name>
<Street>Clementi</Street>
<City>Singapore</City>
<State>Singapore</State>
<Zip>201800</Zip>
</BillToAddress>
</customer>
</customerList>
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="CustomerListSchema" targetNamespace="http://tempuri.org/CustomerListSchema.xsd" elementFormDefault="qualified" xmlns="http://tempuri.org/CustomerListSchema.xsd" xmlns:mstns="http://tempuri.org/CustomerListSchema.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="postalCode">
<xs:restriction base="xs:positiveInteger">
<xs:pattern value="\d{6}" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="usAddress">
<xs:sequence>
<xs:element name="Name" type="xs:string" />
<xs:element name="Street" type="xs:string" />
<xs:element name="City" type="xs:string" />
<xs:element name="State" type="xs:string" />
<xs:element name="Zip" type="postalCode" />
</xs:sequence>
</xs:complexType>
<xs:element name="customerList">
<xs:complexType>
<xs:sequence>
<xs:element name="Customer">
<xs:complexType>
<xs:sequence>
<xs:element name="CompanyName" type="xs:string" />
<xs:element name="ContactName" type="xs:string" />
<xs:element name="Email" type="xs:string" />
<xs:element name="Phone" type="xs:string" />
<xs:element name="ShipToAddress" type="usAddress" />
<xs:element name="BillToAddress" type="usAddress" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="utf-8" ?>
<customerList xmlns="http://tempuri.org/CustomerListSchema.xsd">
<customer>
<CompanyName>Jack The Trader</CompanyName>
<ContactName>Jack</ContactName>
<Email>Jack@hotmail.com</Email>
<Phone>99988002</Phone>
<ShipToAddress>
<Name>Jack Receiver</Name>
<Street>Jurong</Street>
<City>Singapore</City>
<State>Singapore</State>
<Zip>201800</Zip>
</ShipToAddress>
<BillToAddress>
<Name>Jack Sender</Name>
<Street>Clementi</Street>
<City>Singapore</City>
<State>Singapore</State>
<Zip>201800</Zip>
</BillToAddress>
</customer>
</customerList>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment