title: The limit of Element Tree on xpath
body: <p>I've used Element Tree for a while and i love it because of its simplicity</p>
  
  <p>But I'm doubting of its implementation of x path</p>
  
  <p>This is the XML file</p>
  
  <pre><code>&lt;a&gt;
    &lt;b name="b1"&gt;&lt;/b&gt;
    &lt;b name="b2"&gt;&lt;c/&gt;&lt;/b&gt;
    &lt;b name="b2"&gt;&lt;/b&gt;
    &lt;b name="b3"&gt;&lt;/b&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>The python code</p>
  
  <pre><code>import xml.etree.ElementTree as ET
  tree = ET.parse('test.xml')
  root = tree.getroot()
  root.findall("b[@name='b2' and c]")
  </code></pre>
  
  <p>The program shows the error: </p>
  
  <pre><code>invalid predicate
  </code></pre>
  
  <p>But if I use  </p>
  
  <pre><code>root.findall("b[@name='b2']") or 
   root.findall("b[c]")
  </code></pre>
  
  <p>It works,</p>