title: How to fix errors in XML file using php
body: <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  
  &lt;Note&gt;
  &lt;from&gt;
  Ahmad
  &lt;/from&gt;
  &lt;to&gt;
  Yasir
  &lt;/to&gt;
  &lt;body&gt;
  hello yasir.
  
  &lt;/Note&gt;
  </code></pre>
  
  <p>Above is my xml file which misses the ending tag of <code>&lt;body&gt;</code>.
  i want a php program that will detect this error and also fix the error and place the ending tag.</p>