Dart API Referencedart:htmlXPathResult

XPathResult class

Refer to nsIDOMXPathResult for more detail.
@DocsEditable
@DomName('XPathResult')
class XPathResult native "XPathResult" {

 @DomName('XPathResult.ANY_TYPE')
 @DocsEditable
 static const int ANY_TYPE = 0;

 @DomName('XPathResult.ANY_UNORDERED_NODE_TYPE')
 @DocsEditable
 static const int ANY_UNORDERED_NODE_TYPE = 8;

 @DomName('XPathResult.BOOLEAN_TYPE')
 @DocsEditable
 static const int BOOLEAN_TYPE = 3;

 @DomName('XPathResult.FIRST_ORDERED_NODE_TYPE')
 @DocsEditable
 static const int FIRST_ORDERED_NODE_TYPE = 9;

 @DomName('XPathResult.NUMBER_TYPE')
 @DocsEditable
 static const int NUMBER_TYPE = 1;

 @DomName('XPathResult.ORDERED_NODE_ITERATOR_TYPE')
 @DocsEditable
 static const int ORDERED_NODE_ITERATOR_TYPE = 5;

 @DomName('XPathResult.ORDERED_NODE_SNAPSHOT_TYPE')
 @DocsEditable
 static const int ORDERED_NODE_SNAPSHOT_TYPE = 7;

 @DomName('XPathResult.STRING_TYPE')
 @DocsEditable
 static const int STRING_TYPE = 2;

 @DomName('XPathResult.UNORDERED_NODE_ITERATOR_TYPE')
 @DocsEditable
 static const int UNORDERED_NODE_ITERATOR_TYPE = 4;

 @DomName('XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE')
 @DocsEditable
 static const int UNORDERED_NODE_SNAPSHOT_TYPE = 6;

 @DomName('XPathResult.booleanValue')
 @DocsEditable
 final bool booleanValue;

 @DomName('XPathResult.invalidIteratorState')
 @DocsEditable
 final bool invalidIteratorState;

 @DomName('XPathResult.numberValue')
 @DocsEditable
 final num numberValue;

 @DomName('XPathResult.resultType')
 @DocsEditable
 final int resultType;

 @DomName('XPathResult.singleNodeValue')
 @DocsEditable
 final Node singleNodeValue;

 @DomName('XPathResult.snapshotLength')
 @DocsEditable
 final int snapshotLength;

 @DomName('XPathResult.stringValue')
 @DocsEditable
 final String stringValue;

 @DomName('XPathResult.iterateNext')
 @DocsEditable
 Node iterateNext() native;

 @DomName('XPathResult.snapshotItem')
 @DocsEditable
 Node snapshotItem(int index) native;
}

Extends

Interceptor > XPathResult

Static Properties

const int ANY_TYPE #

A result set containing whatever type naturally results from evaluation of the expression. Note that if the result is a node-set then UNORDERED_NODE_ITERATOR_TYPE is always the resulting type.
static const int ANY_TYPE = 0

const int ANY_UNORDERED_NODE_TYPE #

A result node-set containing any single node that matches the expression. The node is not necessarily the first node in the document that matches the expression.
static const int ANY_UNORDERED_NODE_TYPE = 8

const int BOOLEAN_TYPE #

A result containing a single boolean value. This is useful for example, in an XPath expression using the not() function.
static const int BOOLEAN_TYPE = 3

const int FIRST_ORDERED_NODE_TYPE #

A result node-set containing the first node in the document that matches the expression.
static const int FIRST_ORDERED_NODE_TYPE = 9

const int NUMBER_TYPE #

A result containing a single number. This is useful for example, in an XPath expression using the count() function.
static const int NUMBER_TYPE = 1

const int ORDERED_NODE_ITERATOR_TYPE #

A result node-set containing all the nodes matching the expression. The nodes in the result set are in the same order that they appear in the document.
static const int ORDERED_NODE_ITERATOR_TYPE = 5

const int ORDERED_NODE_SNAPSHOT_TYPE #

A result node-set containing snapshots of all the nodes matching the expression. The nodes in the result set are in the same order that they appear in the document.
static const int ORDERED_NODE_SNAPSHOT_TYPE = 7

const int STRING_TYPE #

A result containing a single string.
static const int STRING_TYPE = 2

const int UNORDERED_NODE_ITERATOR_TYPE #

A result node-set containing all the nodes matching the expression. The nodes may not necessarily be in the same order that they appear in the document.
static const int UNORDERED_NODE_ITERATOR_TYPE = 4

const int UNORDERED_NODE_SNAPSHOT_TYPE #

A result node-set containing snapshots of all the nodes matching the expression. The nodes may not necessarily be in the same order that they appear in the document.
static const int UNORDERED_NODE_SNAPSHOT_TYPE = 6

Properties

final bool booleanValue #

readonly boolean
final bool booleanValue

final int hashCode #

inherited from Interceptor

Get a hash code for this object.

All objects have hash codes. Hash codes are guaranteed to be the same for objects that are equal when compared using the equality operator ==. Other than that there are no guarantees about the hash codes. They will not be consistent between runs and there are no distribution guarantees.

If a subclass overrides hashCode it should override the equality operator as well to maintain consistency.

docs inherited from Object
int get hashCode => Primitives.objectHashCode(this);

final bool invalidIteratorState #

readonly boolean
final bool invalidIteratorState

final num numberValue #

readonly float
final num numberValue

final int resultType #

readonly integer (short)
final int resultType

final Type runtimeType #

inherited from Interceptor

A representation of the runtime type of the object.

docs inherited from Object
Type get runtimeType => getRuntimeType(this);

final Node singleNodeValue #

readonly Node
final Node singleNodeValue

final int snapshotLength #

readonly Integer
final int snapshotLength

final String stringValue #

readonly String
final String stringValue

Operators

bool operator ==(other) #

inherited from Interceptor

The equality operator.

The default behavior for all Objects is to return true if and only if this and other are the same object.

If a subclass overrides the equality operator it should override the hashCode method as well to maintain consistency.

docs inherited from Object
bool operator ==(other) => identical(this, other);

Methods

Node iterateNext() #

@DomName('XPathResult.iterateNext')
@DocsEditable
Node iterateNext() native;

dynamic noSuchMethod(Invocation invocation) #

inherited from Interceptor

noSuchMethod is invoked when users invoke a non-existant method on an object. The name of the method and the arguments of the invocation are passed to noSuchMethod in an Invocation. If noSuchMethod returns a value, that value becomes the result of the original invocation.

The default behavior of noSuchMethod is to throw a noSuchMethodError.

docs inherited from Object
dynamic noSuchMethod(Invocation invocation) {
 throw new NoSuchMethodError(
     this,
     _symbolToString(invocation.memberName),
     invocation.positionalArguments,
     _symbolMapToStringMap(invocation.namedArguments));
}

Node snapshotItem(int index) #

@DomName('XPathResult.snapshotItem')
@DocsEditable
Node snapshotItem(int index) native;

String toString() #

inherited from Interceptor

Returns a string representation of this object.

docs inherited from Object
String toString() => Primitives.objectToString(this);

This page includes content from the Mozilla Foundation that is graciously licensed under a Creative Commons: Attribution-Sharealike license. Mozilla has no other association with Dart or dartlang.org. We encourage you to improve the web by contributing to The Mozilla Developer Network.