NodeFilter class
@DocsEditable
@DomName('NodeFilter')
class NodeFilter native "NodeFilter" {
@DomName('NodeFilter.FILTER_ACCEPT')
@DocsEditable
static const int FILTER_ACCEPT = 1;
@DomName('NodeFilter.FILTER_REJECT')
@DocsEditable
static const int FILTER_REJECT = 2;
@DomName('NodeFilter.FILTER_SKIP')
@DocsEditable
static const int FILTER_SKIP = 3;
@DomName('NodeFilter.SHOW_ALL')
@DocsEditable
static const int SHOW_ALL = 0xFFFFFFFF;
@DomName('NodeFilter.SHOW_ATTRIBUTE')
@DocsEditable
static const int SHOW_ATTRIBUTE = 0x00000002;
@DomName('NodeFilter.SHOW_CDATA_SECTION')
@DocsEditable
static const int SHOW_CDATA_SECTION = 0x00000008;
@DomName('NodeFilter.SHOW_COMMENT')
@DocsEditable
static const int SHOW_COMMENT = 0x00000080;
@DomName('NodeFilter.SHOW_DOCUMENT')
@DocsEditable
static const int SHOW_DOCUMENT = 0x00000100;
@DomName('NodeFilter.SHOW_DOCUMENT_FRAGMENT')
@DocsEditable
static const int SHOW_DOCUMENT_FRAGMENT = 0x00000400;
@DomName('NodeFilter.SHOW_DOCUMENT_TYPE')
@DocsEditable
static const int SHOW_DOCUMENT_TYPE = 0x00000200;
@DomName('NodeFilter.SHOW_ELEMENT')
@DocsEditable
static const int SHOW_ELEMENT = 0x00000001;
@DomName('NodeFilter.SHOW_ENTITY')
@DocsEditable
static const int SHOW_ENTITY = 0x00000020;
@DomName('NodeFilter.SHOW_ENTITY_REFERENCE')
@DocsEditable
static const int SHOW_ENTITY_REFERENCE = 0x00000010;
@DomName('NodeFilter.SHOW_NOTATION')
@DocsEditable
static const int SHOW_NOTATION = 0x00000800;
@DomName('NodeFilter.SHOW_PROCESSING_INSTRUCTION')
@DocsEditable
static const int SHOW_PROCESSING_INSTRUCTION = 0x00000040;
@DomName('NodeFilter.SHOW_TEXT')
@DocsEditable
static const int SHOW_TEXT = 0x00000004;
}
Extends
Interceptor > NodeFilter
Static Properties
const int FILTER_ACCEPT #
NodeFilter.acceptNode()
method when a node should be accepted.
static const int FILTER_ACCEPT = 1
const int FILTER_REJECT #
NodeFilter.acceptNode()
method when a node should be rejected. The children of rejected nodes are not visited by the NodeIterator
or TreeWalker
object; this value is treated as "skip this node and all its children".
static const int FILTER_REJECT = 2
const int FILTER_SKIP #
NodeFilter.acceptNode()
for nodes to be skipped by the NodeIterator
or TreeWalker
object. The children of skipped nodes are still considered. This is treated as "skip this node but not its children".
static const int FILTER_SKIP = 3
const int SHOW_ATTRIBUTE #
Attr
nodes. This is meaningful only when creating a NodeIterator
or TreeWalker
with an Attr
node as its root; in this case, it means that the attribute node will appear in the first position of the iteration or traversal. Since attributes are never children of other nodes, they do not appear when traversing over the document tree.
static const int SHOW_ATTRIBUTE = 0x00000002
const int SHOW_CDATA_SECTION #
CDATASection
nodes.
static const int SHOW_CDATA_SECTION = 0x00000008
const int SHOW_DOCUMENT_FRAGMENT #
DocumentFragment
nodes.
static const int SHOW_DOCUMENT_FRAGMENT = 0x00000400
const int SHOW_DOCUMENT_TYPE #
DocumentType
nodes.
static const int SHOW_DOCUMENT_TYPE = 0x00000200
const int SHOW_ENTITY #
Entity
nodes. This is meaningful only when creating a NodeIterator
or TreeWalker
with an Entity
node as its root; in this case, it means that the Entity
node will appear in the first position of the traversal. Since entities are not part of the document tree, they do not appear when traversing over the document tree.
static const int SHOW_ENTITY = 0x00000020
const int SHOW_ENTITY_REFERENCE #
EntityReference
nodes.
static const int SHOW_ENTITY_REFERENCE = 0x00000010
const int SHOW_NOTATION #
Notation
nodes. This is meaningful only when creating a NodeIterator
or TreeWalker
with a Notation
node as its root; in this case, it means that the Notation
node will appear in the first position of the traversal. Since entities are not part of the document tree, they do not appear when traversing over the document tree.
static const int SHOW_NOTATION = 0x00000800
const int SHOW_PROCESSING_INSTRUCTION #
ProcessingInstruction
nodes.
static const int SHOW_PROCESSING_INSTRUCTION = 0x00000040
Properties
final int hashCode #
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.
int get hashCode => Primitives.objectHashCode(this);
Operators
bool operator ==(other) #
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.
bool operator ==(other) => identical(this, other);
Methods
dynamic noSuchMethod(Invocation invocation) #
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.
dynamic noSuchMethod(Invocation invocation) {
throw new NoSuchMethodError(
this,
_symbolToString(invocation.memberName),
invocation.positionalArguments,
_symbolMapToStringMap(invocation.namedArguments));
}
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.