title: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'ReceiptTime'
body: <p>I am trying to validate an xml file. Here is my xsd:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
  
  &lt;xs:element name="EXTRACT"&gt;
      &lt;xs:complexType&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element ref="HEAD"/&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
  
  &lt;/xs:element&gt;
  
  &lt;xs:element name="HEAD"&gt;
  &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
          &lt;xs:element name="RequestId" type="xs:integer"/&gt;
          &lt;xs:element name="RequestsInBatch" type="xs:string"/&gt;
          &lt;xs:element name="PeriodDate" type="xs:date"/&gt;
          &lt;xs:element name="Type" type="xs:string"/&gt;
          &lt;xs:element name="StartDate" type="xs:date"/&gt;
          &lt;xs:element name="EndDate" type="xs:date"/&gt;
          &lt;xs:element name="PricingDate" type="xs:date"/&gt;
          &lt;xs:any minOccurs="0"/&gt;
      &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>Here is my xml file</p>
  
  <pre><code>&lt;?xml version='1.0'?&gt;
  &lt;EXTRACT&gt;
      &lt;HEAD&gt;
          &lt;RequestId&gt;1&lt;/RequestId&gt;
          &lt;RequestsInBatch&gt;1,2&lt;/RequestsInBatch&gt;
          &lt;PeriodDate&gt;2013-03-31&lt;/PeriodDate&gt;
          &lt;Type&gt;Monthly&lt;/Type&gt;
          &lt;StartDate&gt;2013-03-01&lt;/StartDate&gt;
          &lt;EndDate&gt;2013-03-31&lt;/EndDate&gt;
          &lt;PricingDate&gt;2013-03-29&lt;/PricingDate&gt;
          &lt;ReceiptTime&gt;2013-04-02 12:30:00&lt;/ReceiptTime&gt;
          &lt;CreateTime&gt;2013-04-02 16:00:00&lt;/CreateTime&gt;
          &lt;RecordCount&gt;3&lt;/RecordCount&gt;
          &lt;ExceptionCount&gt;1&lt;/ExceptionCount&gt;
          &lt;ExtractType&gt;FLOWS&lt;/ExtractType&gt;
          &lt;ExtractCurrency&gt;USD&lt;/ExtractCurrency&gt;
      &lt;/HEAD&gt;
  &lt;/EXTRACT&gt;
  </code></pre>
  
  <p>I don't care about the other tags, which I thought is indicated by </p>
  
  <blockquote>
  <pre><code>   &lt;xs:any minOccurs="0"/&gt;
  </code></pre>
  </blockquote>
  
  <p>But when I run in Java, I get the following error org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'ReceiptTime'</p>
  
  <p>How can I validate the file so it ignores any element I don't declare in my xsd because I don't need them, but they are in the xml document anyway? I cannot control the contents of the xml document so I only need to focus on the data I want to extract.</p>