getting all child nodes' values of the current node
<p>I am trying to retrieve all of the values in the div. 
For example:</p>

<pre><code>&lt;div&gt;xyz &lt;span&gt; abc &lt;/span&gt; def&lt;/div&gt;
</code></pre>

<p>This is the code</p>

<pre><code>the_page="&lt;div&gt;xyz &lt;span&gt; abc &lt;/span&gt; def&lt;/div&gt;"
doc = libxml2dom.parseString(the_page, html=1)
divs=doc.getElementsByTagName("div")
print divs[0].firstChild.nodeValue
</code></pre>

<p>This only prints "xyz". I tried to just do print divs[0].nodeValue, but that gives me an error. 
I want all of the text. How would I get around this?</p>
