i need to search the html document for text here
text here
and then output the full node path (CSS or XPATH)
for is
Ok try this:
var path = []; var el = document.getElementById('myNode'); do { path.unshift(el.nodeName + (el.className ? ' class="' + el.className + '"' : '')); } while ((el.nodeName.toLowerCase() != 'html') && (el = el.parentNode)); alert(path.join(" > "));