title: lxml: insert tag at a given position
body: <p>I have an xml file, similar to this:</p>
  
  <pre><code>&lt;tag attrib1='I'&gt;
    &lt;subtag1 subattrib1='1'&gt;
      &lt;subtext&gt;text1&lt;/subtext&gt;
    &lt;/subtag1&gt;
    &lt;subtag3 subattrib3='3'&gt;
      &lt;subtext&gt;text3&lt;/subtext&gt;
    &lt;/subtag3&gt;
  &lt;/tag&gt;
  </code></pre>
  
  <p>I would like to insert a new subElement, so the result would be something like this</p>
  
  <pre><code>&lt;tag attrib1='I'&gt;
    &lt;subtag1 subattrib1='1'&gt;
      &lt;subtext&gt;text1&lt;/subtext&gt;
    &lt;/subtag1&gt;
    &lt;subtag2 subattrib2='2'&gt;
      &lt;subtext&gt;text2&lt;/subtext&gt;
    &lt;/subtag2&gt;
    &lt;subtag3 subattrib3='3'&gt;
      &lt;subtext&gt;text3&lt;/subtext&gt;
    &lt;/subtag3&gt;
  &lt;/tag&gt;
  </code></pre>
  
  <p>I can append my xml file, but then the new elements will be inserted at the end. How can I force python lxml to put it into a given position? </p>
  
  <p>Thanks for your help!</p>