title: Xml Parsing is not working-it returns nothing
body: <pre><code>&lt;?xml version=&quot;1.0&quot;?&gt;
  &lt;!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Alex Mantzaris (Firaxis Games) --&gt;
  &lt;!-- Sid Meier's Civilization 4 --&gt;
  &lt;!-- Copyright Firaxis Games 2005 --&gt;
  &lt;!-- --&gt;
  &lt;!-- Leader Infos and AI Settings --&gt;
  &lt;Civ4LeaderHeadInfos xmlns=&quot;x-schema:CIV4CivilizationsSchema.xml&quot;&gt;
      &lt;LeaderHeadInfos&gt;
          &lt;LeaderHeadInfo&gt;
              &lt;Type&gt;LEADER_BARBARIAN&lt;/Type&gt;
              (............)
      &lt;/LeaderHeadInfo&gt;
      &lt;LeaderHeadInfo&gt;
              (.....etc....)
  </code></pre>
  <p>This is XML file. and</p>
  <pre><code>import xml.etree.ElementTree as ET
  from xml.etree.ElementTree import Element, dump, ElementTree
  
  try:
      tree = ET.parse('CIV4LeaderHeadInfos.xml')
  except:
      try:
          xm=input('Directory: ')
      except:
          print(&quot;Error: typed wrong directory.&quot;)
          quit()
      tree = ET.parse(xm)
  
  root = tree.getroot()
  ##print(root)
  ltag = root.findall(&quot;LeaderHeadInfo&quot;)
  print(ltag)
  print(ltag[0].find(&quot;Type&quot;).text)
  </code></pre>
  <p>This is the code I made.</p>
  <pre><code>[]
  Traceback (most recent call last):
    File &quot;C:\Users\aaaa5\Desktop\Study\Python\LeaderXML.py&quot;, line 32, in &lt;module&gt;
      print(ltag[0].find(&quot;Type&quot;).text)
  IndexError: list index out of range
  </code></pre>
  <p>This is what i got when i ran the program.
  ltag is supposed to return but it does not.
  What should I do to make it properly work?</p>