I know how to quickly extract text nodes from a DOM:
document.evaluate('//text()', document, null, XPathResult.ANY_TYPE, null)
But is there an easy way to exclude text from SCRIPT, STYLE, or other tags that are not shown to the user?
Something like:
'//text()[ parent.name not in ("SCRIPT", "STYLE") ]'
Thanks, Mike