From http://stackoverflow.com/questions/10730309/find-all-text-nodes-in-html-page

Efficient way to walk any node for text nodes under it.

Tried this in Firefox . But it returns new line characters also as a text node.