title: How to search for a Xml node with a given attribute value in python
body: <p>I have this XML file and I want to get the country nodes which have the pattern 'in' in their name.</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;data&gt;
      &lt;country name="Liechtenstein"&gt;
          &lt;rank&gt;1&lt;/rank&gt;
          &lt;year&gt;2008&lt;/year&gt;
          &lt;gdppc&gt;141100&lt;/gdppc&gt;
          &lt;neighbor name="Austria" direction="E"/&gt;
          &lt;neighbor name="Switzerland" direction="W"/&gt;
      &lt;/country&gt;
      &lt;country name="Singapore"&gt;
          &lt;rank&gt;4&lt;/rank&gt;
          &lt;year&gt;2011&lt;/year&gt;
          &lt;gdppc&gt;59900&lt;/gdppc&gt;
          &lt;neighbor name="Malaysia" direction="N"/&gt;
      &lt;/country&gt;
      &lt;country name="Panama"&gt;
          &lt;rank&gt;68&lt;/rank&gt;
          &lt;year&gt;2011&lt;/year&gt;
          &lt;gdppc&gt;13600&lt;/gdppc&gt;
          &lt;neighbor name="Costa Rica" direction="W"/&gt;
          &lt;neighbor name="Colombia" direction="E"/&gt;
      &lt;/country&gt;
  &lt;/data&gt;
  </code></pre>
  
  <p>I have tried this    </p>
  
  <pre><code>    import xml.etree.ElementTree as ET
      tree = ET.parse('test.xml')
      root = tree.getroot()
      list=root.find(".//country[contains(@name, 'Pana')]")
  </code></pre>
  
  <p>But I am getting an error : SyntaxError: invalid predicate</p>
  
  <p>Could anyone please help how to solve this?</p>