title: Get all xml attribute values in python3 using ElementTree
body: <p>I have the following xml file </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;data&gt;
      &lt;country name="Liechtenstein"&gt;
          &lt;rank updated="yes"&gt;2&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 updated="yes"&gt;5&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 updated="yes"&gt;69&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 want to write python 3 code using ElementTree to get all country names. So the end result should be a <code>dict</code> or <code>array</code> of </p>
  
  <blockquote>
    <p>['Liechtenstein','Singapore','Panama']</p>
  </blockquote>
  
  <p>I am trying to do this using Xpath but getting nowhere. So my code is as follows</p>
  
  <pre><code>import xml.etree.ElementTree as ET
  tree = ET.parse(xmlfile)
  root = tree.getroot()
  
  names = root.findall("./country/@name")
  </code></pre>
  
  <p>However the above does not work as I feel my xpath is wrong. </p>