title: Python: ignoring namespaces in xml.etree.ElementTree?
body: <p>How can I tell ElementTree to ignore namespaces in an XML file?</p>
  
  <p>For example, I would prefer to query <code>modelVersion</code> (as in statement 1) rather than  <code>{http://maven.apache.org/POM/4.0.0}modelVersion</code> (as in statement 2).</p>
  
  <pre><code>pom="""
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
           http://maven.apache.org/maven-v4_0_0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;/project&gt;
  """
  
  from xml.etree import ElementTree
  ElementTree.register_namespace("","http://maven.apache.org/POM/4.0.0")
  root = ElementTree.fromstring(pom)
  
  print 1,root.findall('modelVersion')
  print 2,root.findall('{http://maven.apache.org/POM/4.0.0}modelVersion')
  
  1 []
  2 [&lt;Element '{http://maven.apache.org/POM/4.0.0}modelVersion' at 0x1006bff10&gt;]
  </code></pre>