DOMXPathResult
classin packageklyn.io.xml.xpath
public class DOMXPathResult extends Object implements XPathResult:
└ DOMXPathResult
All Implemented Interfaces: XPathResult

Pure Klyn implementation of the DOM XPathResult contract.

@example `klyn import klyn.io.xml.xpath import org.w3c.dom.xpath

result = DOMXPathResult.fromString("Klyn", XPathResult.STRING_TYPE, null) print(result.stringValue)

Attributes inherited from XPathResult: ANY_TYPE, ANY_UNORDERED_NODE_TYPE, BOOLEAN_TYPE, FIRST_ORDERED_NODE_TYPE, NUMBER_TYPE, ORDERED_NODE_ITERATOR_TYPE, ORDERED_NODE_SNAPSHOT_TYPE, STRING_TYPE, UNORDERED_NODE_ITERATOR_TYPE, UNORDERED_NODE_SNAPSHOT_TYPE
Properties
Modifier and Type Member Description
public readonly property booleanValue
booleanValue as Boolean:
Boolean result value.
public readonly property invalidIteratorState
invalidIteratorState as Boolean:
Iterator invalidation state.
public readonly property numberValue
numberValue as Double:
Numeric result value.
public readonly property resultType
resultType as Int:
Actual result type.
public readonly property singleNodeValue
singleNodeValue as Node:
Single node result value.
public readonly property snapshotLength
snapshotLength as Int:
Number of nodes in a snapshot result.
public readonly property stringValue
stringValue as String:
String result value.
Properties inherited from Object: type
Properties inherited from XPathResult: booleanValue, invalidIteratorState, numberValue, resultType, singleNodeValue, snapshotLength, stringValue
Constructors
Modifier and Type Member Description
public DOMXPathResult Creates an empty `ANY_TYPE` result.
Methods
Modifier and Type Member Description
public static fromBoolean
fromBoolean(value as Boolean, requestedType as Int, reusable as XPathResult) as XPathResult throws XPathException:
Builds a result from a boolean value.
public static fromNodeSet
fromNodeSet(nodes as ArrayList<Node>, requestedType as Int, reusable as XPathResult) as XPathResult throws XPathException:
Builds a result from a node set.
public static fromNumber
fromNumber(value as Double, requestedType as Int, reusable as XPathResult) as XPathResult throws XPathException:
Builds a result from a numeric value.
public static fromString
fromString(value as String, requestedType as Int, reusable as XPathResult) as XPathResult throws XPathException:
Builds a result from a string value.
public iterateNext
iterateNext() as Node throws XPathException, DOMException:
Returns the next node from an iterator result.
public static nodeStringValue
nodeStringValue(node as Node) as String:
No summary.
public snapshotItem
snapshotItem(index as Int) as Node throws XPathException:
Returns one node from a snapshot result.
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml
Methods inherited from XPathResult: iterateNext, snapshotItem