title: Root element confusion using ElementTree
body: <p>I'm using ElementTree in Python 3.5.1. I want to parse a xml file like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;name&gt;A name&lt;/name&gt;
      &lt;groupId&gt;a.group&lt;/groupId&gt;
      &lt;artifactId&gt;anArtifact&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;properties&gt;
          &lt;dependency-version&gt;10.0&lt;/dependency-version&gt;
          &lt;another-dependency-version&gt;11.0&lt;/another-dependency-version&gt;
      &lt;/properties&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>And get the value of the tag <strong>dependency-version</strong>. I started trying to get the <strong>properties</strong> using this code:</p>
  
  <pre><code>mydoc = ElementTree.parse(sources + "pom.xml")
  root = mydoc.getroot()
  for element in root.findall('properties'):
      print(element)
  </code></pre>
  
  <p>The issue is that I got nothing but the root tag, <strong>project</strong>, and its attributes.</p>
  
  <pre><code>&gt;&gt;&gt; root.tag
  '{http://maven.apache.org/POM/4.0.0}project'
  &gt;&gt;&gt; root.text
  '\n    '
  &gt;&gt;&gt; root.attrib
  {'{http://www.w3.org/2001/XMLSchema-instance}schemaLocation': 'http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd'}
  </code></pre>
  
  <p>I tried also with mydoc directly:</p>
  
  <pre><code>&gt;&gt;&gt; root.findall('project')
  []
  &gt;&gt;&gt; mydoc.findall('./properties')
  []
  &gt;&gt;&gt; mydoc.findall('./project/properties') 
  []
  </code></pre>
  
  <p>I understood that <em>getroot()</em> will give me the project tag and from there I can start working, but seems I got something wrong.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I followed the proposed solution and I got:</p>
  
  <pre><code>&gt;&gt;&gt; ns
  {'sm': 'http://maven.apache.org/POM/4.0.0'}
  &gt;&gt;&gt; mydoc.findall('.//sm:properties', ns)
  [&lt;Element '{http://maven.apache.org/POM/4.0.0}properties' at 0x0325AA80&gt;]
  &gt;&gt;&gt; root.findall('.//sm:properties', ns)
  [&lt;Element '{http://maven.apache.org/POM/4.0.0}properties' at 0x0325AA80&gt;]
  &gt;&gt;&gt; mydoc.findall('.//sm:properties/dependency-version', ns)
  []
  </code></pre>
  
  <p>Seems is finding something now, but not the two elements of the tag <strong>properties</strong></p>