title: Is there a way to skip nodes/elements with iterparse lxml?
body: <p>Is there a way using lxml iterparse to skip an element without checking the tag? Take this xml for example:</p>
  <pre><code>&lt;root&gt;
      &lt;sample&gt;
          &lt;tag1&gt;text1&lt;/tag1&gt;
          &lt;tag2&gt;text2&lt;/tag2&gt;
          &lt;tag3&gt;text3&lt;/tag3&gt;
          &lt;tag4&gt;text4&lt;/tag4&gt;
      &lt;/sample&gt;
      &lt;sample&gt;
          &lt;tag1&gt;text1&lt;/tag1&gt;
          &lt;tag2&gt;text2&lt;/tag2&gt;
          &lt;tag3&gt;text3&lt;/tag3&gt;
          &lt;tag4&gt;text4&lt;/tag4&gt;
      &lt;/sample&gt;
  &lt;/root&gt;
      
  </code></pre>
  <p>If I care about <code>tag1</code> and <code>tag4</code>, checking <code>tag2</code> and <code>tag3</code> will eat up some time. If the file isn't big, it doesn't really matter but if I have a million <code>&lt;sample&gt;</code> nodes, I could reduce search time some if I don't have to check <code>tag2</code> nd <code>tag3</code>. They're always there and I never need them.</p>
  <p>using iterparse in lxml</p>
  <pre><code>import lxml
  
  xmlfile = 'myfile.xml'
  context = etree.iterparse(xmlfile, events('end',), tag='sample')
  
  for event, elem in context:
      for child in elem:
          if child.tag == 'tag1'
              my_list.append(child.text)
  
              #HERE I'd like to advance the loop twice without checking tag2 and tag3 at all
              #something like:
  
              #next(child)
              #next(child)
  
          elif child.tag == 'tag4'
               my_list.append(child.text)
      
  </code></pre>