Content of Element Declaration Must Match and Other Validation Errors <p>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!</p> <p>Here is my XML:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt; &lt;CustomerAccount xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" LastUpdated="2011-12-01" xsi:noNamespaceSchemaLocation="me.xsd"&gt; &lt;UpdatedBy kind="SalesPerson"&gt;Lisa Moroz&lt;/UpdatedBy&gt; &lt;ShipTo country="Canada"&gt; &lt;name&gt;Maya Wells&lt;/name&gt; &lt;street&gt;44 Gamble Avenue&lt;/street&gt; &lt;city&gt;Toronto&lt;/city&gt; &lt;province&gt;ON&lt;/province&gt; &lt;zip&gt;L1M3G1&lt;/zip&gt; &lt;/ShipTo&gt; &lt;ShipTo country="Canada"&gt; &lt;name&gt;Maya Wells&lt;/name&gt; &lt;street&gt;62 Elm Street&lt;/street&gt; &lt;city&gt;Montreal&lt;/city&gt; &lt;province&gt;QC&lt;/province&gt; &lt;zip&gt;K2J3H4&lt;/zip&gt; &lt;/ShipTo&gt; &lt;BillTo&gt; &lt;country&gt;Canada&lt;/country&gt; &lt;name&gt;Maya Wells&lt;/name&gt; &lt;street&gt;78 Audley Street&lt;/street&gt; &lt;city&gt;Oakville&lt;/city&gt; &lt;province&gt;ON&lt;/province&gt; &lt;zip&gt;O3R1M5&lt;/zip&gt; &lt;/BillTo&gt; &lt;/CustomerAccount&gt; </code></pre> <p>And here is my Schema:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"&gt; &lt;xs:element name="CustomerAccount"&gt; &lt;xs:complexType&gt; &lt;xs:sequence&gt; &lt;xs:simpleType&gt; &lt;xs:element name="UpdatedBy" type="xs:string" /&gt; &lt;/xs:simpleType&gt; &lt;xs:sequence&gt; &lt;xs:element name="ShipTo" type="ShipToType" minOccurs="1" maxOccurs="unbounded"/&gt; &lt;xs:element name="BillTo" type="BillToType" /&gt; &lt;/xs:sequence&gt; &lt;xs:attribute name ="kind" type="xs:string" /&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:element&gt; &lt;xs:complexType name="ShipToType"&gt; &lt;xs:sequence&gt; &lt;xs:element name="name" type="xs:string"/&gt; &lt;xs:element name="street" type="xs:string"/&gt; &lt;xs:element name="city" type="xs:string"/&gt; &lt;xs:element name="province" type="xs:string"/&gt; &lt;xs:element name="zip" type="xs:string"/&gt; &lt;/xs:sequence&gt; &lt;xs:attribute name="country" type="xs:string"/&gt; &lt;/xs:complexType&gt; &lt;xs:complexType name="BillToType"&gt; &lt;xs:sequence&gt; &lt;xs:element name="country" type="xs:string" /&gt; &lt;xs:element name="name" type="xs:string"/&gt; &lt;xs:element name="street" type="xs:string"/&gt; &lt;xs:element name="city" type="xs:string"/&gt; &lt;xs:element name="province" type="xs:string"/&gt; &lt;xs:element name="zip" type="xs:string"/&gt; &lt;/xs:sequence&gt; &lt;/xs:complexType&gt; &lt;/xs:schema&gt; </code></pre> <p>Thanks for your help!</p>