files/en-us/web/api/xpathresult/index.md
{{APIRef("DOM")}}
The XPathResult interface represents the results generated by evaluating an XPath expression within the context of a given node.
Since XPath expressions can result in a variety of result types, this interface makes it possible to determine and handle the type and value of the result.
boolean representing the value of the result if resultType is BOOLEAN_TYPE.true if resultType is UNORDERED_NODE_ITERATOR_TYPE or ORDERED_NODE_ITERATOR_TYPE and the document has been modified since this result was returned.number representing the value of the result if resultType is NUMBER_TYPE.number code representing the type of the result, as defined by the type constants.null.resultType is STRING_TYPE.null if there are no more nodes.null in case the index is not within the range of nodes. Unlike the iterator result, the snapshot does not become invalid, but may not correspond to the current document if it is mutated.{{Specifications}}
{{Compat}}