title: How to get following sibling of an etree._Element
body: <p>I am iterating over elements which I find in a xml file like so:</p>
  
  <pre><code>for elem in fileasxml.xpath("//elementname[some condition]"):
      do something
  </code></pre>
  
  <p>Now instead of <code>do something</code> I'd like to write the element I have found plus the first following-sibling to a file. Now I know how to write to a file, what I don't know is how to get the following sibling. </p>
  
  <p>I've seen the <code>getnext()</code> method but it doesn't work since the element I'd like to get is not in <code>elem</code>. </p>
  
  <p>Same reason I can't use <code>elem.xpath()</code></p>
  
  <p>Any ideas ?</p>