TagNode class

A node which can have a name, attributes, and children.

Inheritance

Constructors

TagNode.new(String name)

Properties

attributes Map<String, String>
getter/setter pair
children List<Node>
Get a list of children belonging to this node. Do not modify this list directly -- use appendChild and removeChild instead.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
name String
getter/setter pair
parent Node?
Get this node's parent.
getter/setter pairinherited
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
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
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 is child's parent, child.parent will be set to null.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String attribute) → dynamic
Get an attribute by name.
operator []=(String attribute, String value) → void
Set an attribute by name.