XPathResult

open class XPathResult(source)

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

MDN Reference

Types

Link copied to clipboard
object Companion
Link copied to clipboard
sealed interface ResultType

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The read-only booleanValue property of the XPathResult interface returns the boolean value of a result with XPathResult.resultType being BOOLEAN_TYPE.

Link copied to clipboard

The read-only invalidIteratorState property of the XPathResult interface signifies that the iterator has become invalid.

Link copied to clipboard
Link copied to clipboard

The read-only numberValue property of the XPathResult interface returns the numeric value of a result with XPathResult.resultType being NUMBER_TYPE.

Link copied to clipboard

The read-only resultType property of the XPathResult interface represents the type of the result, as defined by the type constants.

Link copied to clipboard

The read-only singleNodeValue property of the XPathResult interface returns a Node value or null in case no node was matched of a result with XPathResult.resultType being ANY_UNORDERED_NODE_TYPE or FIRST_ORDERED_NODE_TYPE.

Link copied to clipboard

The read-only snapshotLength property of the XPathResult interface represents the number of nodes in the result snapshot.

Link copied to clipboard
Link copied to clipboard

The read-only stringValue property of the XPathResult interface returns the string value of a result with XPathResult.resultType being STRING_TYPE.

Functions

Link copied to clipboard

The iterateNext() method of the XPathResult interface iterates over a node set result and returns the next node from it or null if there are no more nodes.

Link copied to clipboard
fun snapshotItem(index: Int): Node?

The snapshotItem() method of the XPathResult interface returns an item of the snapshot collection or null in case the index is not within the range of nodes.