title: Parsing nested XML with ElementTree
body: <p>I have the following XML format, and I want to pull out the values for name, region, and status using python's xml.etree.ElementTree module.</p>
  
  <p>However, my attempt to get this information has been unsuccessful so far.</p>
  
  <pre><code>&lt;feed&gt;
      &lt;entry&gt;
          &lt;id&gt;uuid:asdfadsfasdf123123&lt;/id&gt;
          &lt;title type="text"&gt;&lt;/title&gt;
          &lt;content type="application/xml"&gt;
              &lt;NamespaceDescription xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;
                  &lt;Name&gt;instancename&lt;/Name&gt;
                  &lt;Region&gt;US&lt;/Region&gt;
                  &lt;Status&gt;Active&lt;/Status&gt;
              &lt;/NamespaceDescription&gt;
          &lt;/content&gt;
      &lt;/entry&gt;
      &lt;entry&gt;
          &lt;id&gt;uuid:asdfadsfasdf234234&lt;/id&gt;
          &lt;title type="text"&gt;&lt;/title&gt;
          &lt;content type="application/xml"&gt;
              &lt;NamespaceDescription xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;
                  &lt;Name&gt;instancename2&lt;/Name&gt;
                  &lt;Region&gt;US2&lt;/Region&gt;
                  &lt;Status&gt;Active&lt;/Status&gt;
              &lt;/NamespaceDescription&gt;
          &lt;/content&gt;
      &lt;/entry&gt;
  &lt;/feed&gt;
  </code></pre>
  
  <p>My code attempt:</p>
  
  <pre><code>NAMESPACE = '{http://www.w3.org/2005/Atom}'
  root = et.fromstring(XML_STRING)
  entry_root = root.findall('{0}entry'.format(NAMESPACE))
  for child in entry_root:
      content_node = child.find('{0}content'.format(NAMESPACE))
      for content in content_node:
          for desc in content.iter():
              print desc.tag
              name = desc.find('{0}Name'.format(NAMESPACE))
              print name
  </code></pre>
  
  <p>desc.tag is giving me the nodes I want to access, but name is returning None. Any ideas what's wrong with my code?</p>
  
  <p>Output of desc.tag:</p>
  
  <pre><code>{http://schemas.microsoft.com/netservices/2010/10/servicebus/connect}Name
  {http://schemas.microsoft.com/netservices/2010/10/servicebus/connect}Region
  {http://schemas.microsoft.com/netservices/2010/10/servicebus/connect}Status
  </code></pre>