Posted By

xzkcz on 01/12/09


Tagged

Firefox XPath


Versions (?)

selectNodeByXPath


 / Published in: JavaScript
 

  1. function selectNodeByXPath(sXPath){
  2. var oEvaluator = new XPathEvaluator();
  3. var eNode = document.evaluate(sXPath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE,null);
  4. return eNode.singleNodeValue;
  5. }

Report this snippet  

You need to login to post a comment.