title: XML Validation error -Root element must match doctype
body: <p>Im trying to validate my XML file with an external DTD. But I get this error everytime.</p>
  
  <pre><code>Document root element "A", must match DOCTYPE root "test".
  </code></pre>
  
  <p>i cant figure this out.</p>
  
  <p>The idea of my xml file is that its need to be as short as possible .
  I thinkt its all good but like i said, i wont validate. Does someone have an idea ?</p>
  
  <p>This is my XML file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!DOCTYPE test SYSTEM "test.dtd"&gt;
  
  &lt;A&gt;
  &lt;B&gt;
  &lt;F&gt;name&lt;/F&gt;
  &lt;/B&gt;
  &lt;D&gt;lastname&lt;/D&gt;
  &lt;F&gt;name&lt;/F&gt;
  &lt;/A&gt;
  </code></pre>
  
  <p>And my DTD</p>
  
  <pre><code>&lt;!ELEMENT A (B, (C|D), E?, (F, G?)+)&gt;
  &lt;!ELEMENT B (F|G)+&gt;
  &lt;!ELEMENT D (#PCDATA|C)*&gt;
  &lt;!ELEMENT F (#PCDATA)&gt;
  &lt;!ELEMENT G (#PCDATA)&gt;
  &lt;!ELEMENT C (#PCDATA)&gt;
  &lt;!ELEMENT E (#PCDATA)&gt;
  </code></pre>
  
  <p>Thanks</p>