The results generated by evaluating an XPath expression within the context of a given node.

MDN Reference

interface XPathResult {
    ANY_TYPE: 0;
    ANY_UNORDERED_NODE_TYPE: 8;
    BOOLEAN_TYPE: 3;
    booleanValue: boolean;
    FIRST_ORDERED_NODE_TYPE: 9;
    invalidIteratorState: boolean;
    NUMBER_TYPE: 1;
    numberValue: number;
    ORDERED_NODE_ITERATOR_TYPE: 5;
    ORDERED_NODE_SNAPSHOT_TYPE: 7;
    resultType: number;
    singleNodeValue: null | Node;
    snapshotLength: number;
    STRING_TYPE: 2;
    stringValue: string;
    UNORDERED_NODE_ITERATOR_TYPE: 4;
    UNORDERED_NODE_SNAPSHOT_TYPE: 6;
    iterateNext(): null | Node;
    snapshotItem(index: number): null | Node;
}

Properties

ANY_TYPE: 0
ANY_UNORDERED_NODE_TYPE: 8
BOOLEAN_TYPE: 3
booleanValue: boolean
FIRST_ORDERED_NODE_TYPE: 9
invalidIteratorState: boolean
NUMBER_TYPE: 1
numberValue: number
ORDERED_NODE_ITERATOR_TYPE: 5
ORDERED_NODE_SNAPSHOT_TYPE: 7
resultType: number
singleNodeValue: null | Node
snapshotLength: number
STRING_TYPE: 2
stringValue: string
UNORDERED_NODE_ITERATOR_TYPE: 4
UNORDERED_NODE_SNAPSHOT_TYPE: 6

Methods

  • Returns null | Node

  • Parameters

    • index: number

    Returns null | Node