DocumentNode class
The root node of a document.
Constructors
Properties
-
children
→ List<
Node> -
Get a list of children belonging to this node. Do not modify this list directly -- use
appendChild
andremoveChild
instead.no setterinherited -
declarations
↔ Map<
String, Map< String, String> > -
Top-level document attribute groups. Use
getDeclaration
,setDeclaration
andmakeDeclaration
to access these.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- parent ↔ Node?
-
Get this node's parent.
getter/setter pairinherited-getteroverride-setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
appendChild(
Node child) → void -
Reparent
child
to this node.inherited -
findByAttribute(
String attr, String value) → TagNode? -
Find a single child element (tag) by its name.
inherited
-
findByName(
String name) → TagNode? -
Find a single child element (tag) by its name.
inherited
-
findManyByAttribute(
String attr, String value) → Iterable< TagNode> -
Find all child elements with a name.
inherited
-
findManyByName(
String name) → Iterable< TagNode> -
Find all child elements with a name.
inherited
-
findNode(
dynamic builder(Query< Node> )) → Node? -
Find a single child node matching the query produced by
builder
.inherited -
findNodes(
dynamic builder(Query< Node> )) → Iterable<Node> -
Find all child nodes matching the query produced by
builder
.inherited -
findTag(
dynamic builder(TagQuery)) → TagNode? -
Find a single child element (tag) matching the query produced by
builder
.inherited -
findTags(
dynamic builder(TagQuery)) → Iterable< TagNode> -
Find all child elements (tags) matching the query produced by
builder
.inherited -
getDeclaration(
String declaration, String name) → String? - Get an attribute from a declaration by name.
-
innerSource(
[int level = 0]) → String -
Reconstruct this Node's inner source code (the source of its children.)
inherited
-
innerText(
) → String -
Get all raw text contained within this node.
inherited
-
makeDeclaration(
String declaration) → void - Create a new, empty declaration (top-level attribute category) if it does not already exist.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
outerSource(
[int level = 0]) → String -
Reconstruct this Node's source code.
override
-
removeChild(
Node child) → void -
Remove
child
from this node's list of children. If this node ischild
's parent,child.parent
will be set tonull
.inherited -
setDeclaration(
String declaration, String name, String value) → void - Set a declaration (top-level categorized attribute.)
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited