title: How to fix unclosed-tag XML in java
body: <p>I'm parsing XML in java using StaX, but my XML is not well-formed so the parser will throw error. In XML, there are unclosed-tags</p>
  
  <p>for example : </p>
  
  <pre><code>&lt;person&gt;
    &lt;name&gt;John&lt;/name&gt;
    &lt;age&gt;21
    ...
    ...
  &lt;/person&gt;
  </code></pre>
  
  <p>the <code>&lt;age&gt;</code> tag doesn't has closed tag <code>&lt;/age&gt;</code>. So I need to fix the XML first..</p>
  
  <p>how can I fix the XML to close the unclosed-tag? </p>
  
  <p>is there a library to do this ? I've tried JTidy &amp; HTMlCleaner, but I still can't figure out how to fix the XML. I need library in java, not stand alone app.
  Thanks</p>