Created
May 16, 2017 01:34
-
-
Save lmgeorge/ac866fa394deb6a6d3b4800615d20f3f to your computer and use it in GitHub Desktop.
Using XPATH w/ JS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var div = document.createElement('div'); | |
var result; | |
div.innerHTML = $('.tpSubtitleRegion_speaker .gwt-HTML').prop('innerHTML'); | |
result = document.evaluate("//text()", div, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
for(var i=0; i < result.snapshotLength; i++) { | |
console.dir(result.snapshotItem(i)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment