 <blockquote> <p>Usually using <code>lxml</code> and xpath is a common approach in Python. </p> </blockquote> <p>As you want to use <code>minidom</code> explicitly, you can use the following method to get all HTML elements of a particular tag.</p> <pre><code>matches = dom.getElementsByTagName("foo") for e in matches: print(e.firstChild.nodeValue) </code></pre>