title: Splitting XML file into multiple at given tags
body: <p>I want to split a XML file into multiple files. My workstation is very limited to Eclipse Mars with Xalan 2.7.1.</p>
  
  <p>I can also use Python, but never used it before.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;root&gt;
      &lt;row&gt;
          &lt;NAME&gt;Doe&lt;/NAME&gt;
          &lt;FIRSTNAME&gt;Jon&lt;/FIRSTNAME&gt;
          &lt;GENDER&gt;M&lt;/GENDER&gt;
      &lt;/row&gt;
      &lt;row&gt;
          &lt;NAME&gt;Mustermann&lt;/NAME&gt;
          &lt;FIRSTNAME&gt;Max&lt;/FIRSTNAME&gt;
          &lt;GENDER&gt;M&lt;/GENDER&gt;
      &lt;/row&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>How can I transform them to look like this</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;root&gt;
          &lt;row&gt;
              &lt;NAME&gt;Doe&lt;/NAME&gt;
              &lt;FIRSTNAME&gt;Jon&lt;/FIRSTNAME&gt;
              &lt;GENDER&gt;M&lt;/GENDER&gt;
          &lt;/row&gt;
      &lt;/root&gt;
  </code></pre>
  
  <p>I need every "row"-data in a single file with header. The data above is just an example. Most of the "row"-data has 16 attributes, but it varies from time to time.</p>