title: xml.dom.minidom getting elements by tagname
body: <p>How can I retrieve the value of <strong>code</strong> with this (below) xml string and when using xml.dom.minidom?</p>
  
  <pre><code>&lt;data&gt;
      &lt;element1&gt;
          &lt;name&gt;myname&lt;/name&gt;
      &lt;/element1&gt;
      &lt;element2&gt;
          &lt;code&gt;3&lt;/code&gt;
          &lt;name&gt;another name&lt;/name&gt;
      &lt;/element2&gt;
  &lt;/data&gt;
  </code></pre>
  
  <p>Because multiple 'name' tags can appear I would like to do something like this:</p>
  
  <pre><code>from xml.dom.minidom import parseString
  dom = parseString("&lt;data&gt;...&lt;/data&gt;")
  dom.getElementsByTagName("element1").getElementsByTagName("name")
  </code></pre>
  
  <p>But that doesn't work unfortunately.</p>