My name is Vasyl Khrystiuk‎ > ‎pub‎ > ‎JavaScript‎ > ‎

xpath javascript

Tags: javascript_tag, xpath_tag

function xPathFunct(xPathExp){
        var resXPath = document.evaluate(xPathExp, document, null, XPathResult.ANY_TYPE, null);
        var result=resXPath.iterateNext();
        var resArray = [];
        while (result){
            resArray.push(result);
            result=resXPath.iterateNext();
        }
        return resArray;
    }
Comments