How to use the evaluate function from xpath

Find comprehensive JavaScript xpath.evaluate code examples handpicked from public code repositorys.

336
337
338
339
340
341
342
343
344
345
var serializer = new XMLSerializer();
const doc = docParser.parseFromString(result.data, "application/xml")

try {
    if (entry.xPath && entry.xPath !== "") {
        const allParagraphs = xpath.evaluate(
            entry.xPath,
            doc,
            null,
            xpath.XPathResult.ANY_TYPE,
fork icon0
star icon0
watch icon1

+ 3 other calls in file

21
22
23
24
25
26
27
28
29
30
const resultType = xpath.XPathResult.ORDERED_NODE_ITERATOR_TYPE;
const rows = xpath.evaluate(myXPath, xmlDocument, null, resultType, null);
let thisRow = rows.iterateNext();

while (thisRow) {
  const idCell = xpath.evaluate(
    "@objectid",
    thisRow,
    null,
    xpath.XPathResult.STRING_TYPE,
fork icon0
star icon0
watch icon1

+ 5 other calls in file