XPathResult extension type
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.
API documentation sourced from MDN Web Docs.
- on
- Implemented types
- Available extensions
Properties
- booleanValue → bool
-
The read-only
booleanValue
property of the XPathResult interface returns the boolean value of a result with XPathResult.resultType beingBOOLEAN_TYPE
.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- invalidIteratorState → bool
-
The read-only
invalidIteratorState
property of the XPathResult interface signifies that the iterator has become invalid. It istrue
if XPathResult.resultType isUNORDERED_NODE_ITERATOR_TYPE
orORDERED_NODE_ITERATOR_TYPE
and the document has been modified since this result was returned.no setter - numberValue → double
-
The read-only
numberValue
property of the XPathResult interface returns the numeric value of a result with XPathResult.resultType beingNUMBER_TYPE
.no setter - resultType → int
-
The read-only
resultType
property of the XPathResult interface represents the type of the result, as defined by the type constants.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- singleNodeValue → Node?
-
The read-only
singleNodeValue
property of the XPathResult interface returns a Node value ornull
in case no node was matched of a result with XPathResult.resultType beingANY_UNORDERED_NODE_TYPE
orFIRST_ORDERED_NODE_TYPE
.no setter - snapshotLength → int
-
The read-only
snapshotLength
property of the XPathResult interface represents the number of nodes in the result snapshot.no setter - stringValue → String
-
The read-only
stringValue
property of the XPathResult interface returns the string value of a result with XPathResult.resultType beingSTRING_TYPE
.no setter
Methods
-
iterateNext(
) → Node? -
The
iterateNext()
method of the XPathResult interface iterates over a node set result and returns the next node from it ornull
if there are no more nodes. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
snapshotItem(
int index) → Node? -
The
snapshotItem()
method of the XPathResult interface returns an item of the snapshot collection ornull
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. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- ANY_TYPE → const int
- ANY_UNORDERED_NODE_TYPE → const int
- BOOLEAN_TYPE → const int
- FIRST_ORDERED_NODE_TYPE → const int
- NUMBER_TYPE → const int
- ORDERED_NODE_ITERATOR_TYPE → const int
- ORDERED_NODE_SNAPSHOT_TYPE → const int
- STRING_TYPE → const int
- UNORDERED_NODE_ITERATOR_TYPE → const int
- UNORDERED_NODE_SNAPSHOT_TYPE → const int