How do you/is there a way to figure out if a block of HTML contains zero text nodes?
e.g. this:
<p><div><span></span></div></p>
contains zero text nodes whereas this:
<p>Stuff</p><div><span>other stuff</span></div>
contains two.
Additionally, you're guaranteed that the HTML is XHTML-compliant and the content is probably less than 4k in size. I'm using .net, so if some kind of server-side suggestion is made, please make it in C#. I suppose I could load the thing into an XmlDocument and traverse the DOM tree looking for non-empty XmlText nodes, but that would be a last resort as speed is of paramount concern.