How Do I Retrieve All Text In An Html Dom But Exclude Script And Style Tags?
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
Solution 1:
//*[not(self::script or self::style)]/text()
Post a Comment for "How Do I Retrieve All Text In An Html Dom But Exclude Script And Style Tags?"