Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to access xpath in js

function getElementByXpath(path) {
  return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #access #xpath #js
ADD COMMENT
Topic
Name
7+9 =