XML : Content of Element Declaration Must Match and Other Validation Errors

I am very new to XML and Schema and am having a really hard time trying to validate my document. I keep getting the error that Content of Element Declaration Must Match at line 13 column 58. I have tried everything I can possibly think of and read every article and other question and can't figure it out. Please help!

Here is my XML:

  <?xml version="1.0" encoding="UTF-8" ?>  <CustomerAccount xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" LastUpdated="2011-12-01" xsi:noNamespaceSchemaLocation="me.xsd">      <UpdatedBy kind="SalesPerson">Lisa Moroz</UpdatedBy>      <ShipTo country="Canada">      <name>Maya Wells</name>      <street>44 Gamble Avenue</street>      <city>Toronto</city>      <province>ON</province>      <zip>L1M3G1</zip>    </ShipTo>      <ShipTo country="Canada">      <name>Maya Wells</name>      <street>62 Elm Street</street>      <city>Montreal</city>      <province>QC</province>      <zip>K2J3H4</zip>    </ShipTo>      <BillTo>      <country>Canada</country>      <name>Maya Wells</name>      <street>78 Audley Street</street>      <city>Oakville</city>      <province>ON</province>      <zip>O3R1M5</zip>    </BillTo>    </CustomerAccount>    

And here is my Schema:

  <?xml version="1.0" encoding="UTF-8"?>  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">    <xs:element name="CustomerAccount">      <xs:complexType>        <xs:sequence>          <xs:simpleType>            <xs:element name="UpdatedBy" type="xs:string" />          </xs:simpleType>        <xs:sequence>          <xs:element name="ShipTo" type="ShipToType" minOccurs="1" maxOccurs="unbounded"/>          <xs:element name="BillTo" type="BillToType" />        </xs:sequence>        <xs:attribute name ="kind" type="xs:string" />        </xs:sequence>      </xs:complexType>    </xs:element>        <xs:complexType name="ShipToType">      <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="province" type="xs:string"/>        <xs:element name="zip" type="xs:string"/>      </xs:sequence>      <xs:attribute name="country" type="xs:string"/>    </xs:complexType>        <xs:complexType name="BillToType">      <xs:sequence>        <xs:element name="country" type="xs:string" />        <xs:element name="name" type="xs:string"/>        <xs:element name="street" type="xs:string"/>        <xs:element name="city" type="xs:string"/>        <xs:element name="province" type="xs:string"/>        <xs:element name="zip" type="xs:string"/>       </xs:sequence>     </xs:complexType>      </xs:schema>    

Thanks for your help!

No comments:

Post a Comment