XPathNodeset class

The result of a path expression: a list of node references.

Port of org.javarosa.xpath.XPathNodeset (and, through XPathNodeset.lazy, XPathLazyNodeset). Converting a nodeset to a single value (unpack) requires it to contain at most one node.

Constructors

XPathNodeset(List<TreeReference> refs, DataInstance? _instance, EvaluationContext? _context)
A nodeset of refs in instance.
XPathNodeset.invalidPath(String pathEvaluated, String originalPath)
A nodeset for a path that didn't resolve; any access throws.
XPathNodeset.lazy(TreeReference ref, DataInstance instance, EvaluationContext context)
A nodeset for ref that is only expanded when needed.
factory

Properties

context → EvaluationContext?
The evaluation context the nodeset was produced in.
no setter
hashCode → int
The hash code for this object.
no setterinherited
instance → DataInstance?
The instance the references point into.
no setter
nodeContents → String
The node references joined by ; (for error messages).
no setter
nonEmptySize → int
Number of nodes that have children or a value.
no setter
references → List<TreeReference>?
The node references, in document order (null for an invalid path).
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → int
Number of nodes (0 for an invalid path).
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refAt(int i) → TreeReference
The reference of node i.
toArgList() → List<Object>
The values of all nodes.
toString() → String
A string representation of this object.
inherited
unpack() → Object
The single value of this nodeset: '' when empty, the node's value when it has one node; throws when it has several.
valueAt(int i) → Object
The value of node i.

Operators

operator ==(Object other) → bool
The equality operator.
inherited