title: Deserializing part of xml gives element not declared error
body: <p>I am attempting to deserialize only part of an xml, like in this post - <a href="https://stackoverflow.com/questions/369792/how-to-deserialize-only-part-of-an-xml-document-in-c-sharp/36615972#36615972">How to deserialize only part of an XML document in C#</a>.</p>
  
  <p>This works, I get an object back!</p>
  
  <p>But, with a validation error of type "... element is not declared".</p>
  
  <p>Sketchy structre of my xml:</p>
  
  <pre><code>&lt;UploadDocument&gt;
    &lt;Document&gt;
      &lt;!-- Inner xml removed--&gt;
    &lt;/Document&gt;
  &lt;/UploadDocument&gt;
  </code></pre>
  
  <p>And the error message is - Document element is not declared.</p>
  
  <p>If I attempt to deserialize the root element - UploadDocument - it just works with no validation errors.</p>
  
  <p>My observation:
  When the schema is compiled, the Elements collection has only the root element - UploadDocument.</p>