Mega Code Archive

 
Categories / XML Tutorial / XML Schema
 

Element Declarations

File: Schema.xsd <?xml version = "1.0" ?> <schema xmlns = "http://www.w3.org/2001/XMLSchema"> <element name = "Address">    <complexType>       <sequence>          <element name = "Street" type = "string" />          <element name = "Town" type = "string" />          <element name = "City" type = "string" />          <element name = "StateProvinceCounty" type = "string" />          <element name = "Country" type = "string" />          <element name = "ZipPostCode" type = "string" />       </sequence>    </complexType> </element> </schema> File: Data.xml <?xml version = "1.0" ?> <Address>    <Street>10 Place</Street>    <Town>A</Town>    <City>B</City>    <StateProvinceCounty>C</StateProvinceCounty>    <Country>D</Country>    <ZipPostCode>2021</ZipPostCode> </Address>