I've got an HTML string that might look something like this:
<body>
<div>
<span class="blah">Monkey </span>
<p>breath really <b>stinks</b></p>
And I don't like it!
</div>
</body>
As you can see, there's some text contained properly as a value inside of an element, there's elements that contain text nodes and other elements. I would like to be able to get all the text values under body (assume body is a DOMElement that I have stored in a variable).
So, the output would look something like:
Monkey breat really stinks And I don't like it!
How would I do this? XPath? Regexps? Magic?