title: How to fix that overlapping XML?
body: <p>I have a problem. I am making some changes in XML code but sometimes it gets overlapped like:</p>
  
  <pre><code>&lt;xref&gt;&lt;mytag&gt;&lt;/xref&gt;&lt;/mytag&gt;
  </code></pre>
  
  <p>I am thinking about a script that will parse XML file and fix that problem like:</p>
  
  <pre><code>&lt;xref&gt;&lt;mytag&gt;&lt;/mytag&gt;&lt;/xref&gt;&lt;mytag&gt;&lt;/mytag&gt;
  </code></pre>
  
  <p>Can anyone help my with that? Maybe some regular expression? Or some tool ready for use, python script etc. I got many files to fix and I will appreciate every advice!s</p>