title: How Check if a XML file if well formed using delphi?
body: <p>How can I check if a xml file is well formed without invalid chars or tags?</p>
  <p>For example, consider this xml:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot;?&gt;
  &lt;PARTS&gt;
     &lt;TITLE&gt;Computer Parts&lt;/TITLE&gt;
     &lt;PART&gt;
        &lt;ITEM&gt;Motherboard&lt;/ITEM&gt;
        &lt;MANUFACTURER&gt;ASUS&lt;/MANUFACTURER&gt;
        &lt;MODEL&gt;P3B-F&lt;/MODEL&gt;
        &lt;COST&gt; 123.00&lt;/COST&gt;
     &lt;/PART&gt;
     &lt;PART&gt;
        &lt;ITEM&gt;Video Card&lt;/ITEM&gt;
        &lt;MANUFACTURER&gt;ATI&lt;/MANUFACTURER&gt;
        &lt;MODEL&gt;All-in-Wonder Pro&lt;/MODEL&gt;
        &lt;COST&gt; 160.00&lt;/COST&gt;
     &lt;/PART&gt;
  &lt;/PARTSx&gt;
  </code></pre>
  <p>The last tag <code>&lt;/PARTSx&gt;</code>must be <code>&lt;/PARTS&gt;</code></p>