XmlNodeWithChildren class abstract
Base class for nodes with children that can contain XmlElements.
- Inheritance
- Implementers
- Annotations
-
- @immutable
Constructors
-
XmlNodeWithChildren({List<
XmlNode> ? children}) -
const
Properties
-
children
→ List<
XmlNode> ? -
The list of children each getter and method references.
final
- firstChild → XmlElement?
-
Returns the first XmlElement found in children.
no setter
- hasChildren → bool
-
Returns
true
if children isn't null or empty.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- lastChild → XmlElement?
-
Returns the last XmlElement found in children.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getChild(
String elementName) → XmlElement? -
Returns the first direct child named
elementName
. -
getChildren(
String elementName, {int start = 0, int? stop}) → List< XmlElement> ? -
Returns all direct children named
elementName
. -
getChildrenWhere(
{String? name, String? id, List< String> ? attributeNames, List<XmlAttribute> ? attributes, bool matchAllAttributes = false, bool attributesMustBeIdentical = false, List<XmlNode> ? children, bool matchAllChildren = false, bool childrenMustBeIdentical = false, int start = 0, int? stop}) → List<XmlElement> ? - Returns all direct children with properties matching those specified.
-
getChildWhere(
{String? name, String? id, List< String> ? attributeNames, List<XmlAttribute> ? attributes, bool matchAllAttributes = false, bool attributesMustBeIdentical = false, List<XmlNode> ? children, bool matchAllChildren = false, bool childrenMustBeIdentical = false}) → XmlElement? - Returns all direct children with properties matching those specified.
-
getElement(
String elementName) → XmlElement? -
Recursively checks all elements within this node tree and
returns the first element found named
elementName
. -
getElements(
String elementName, {bool ignoreNestedMatches = true, int start = 0, int? stop}) → List< XmlElement> ? -
Recursively checks all elements within this node tree and
returns any elements found named
elementName
. -
getElementsWhere(
{String? name, String? id, List< String> ? attributeNames, List<XmlAttribute> ? attributes, bool matchAllAttributes = false, bool attributesMustBeIdentical = false, List<XmlNode> ? children, bool matchAllChildren = false, bool childrenMustBeIdentical = false, bool ignoreNestedMatches = true, int start = 0, int? stop, bool global = true, bool reversed = false}) → List<XmlElement> ? - Recursively checks all elements within the node tree and returns any elements found with properties matching those specified.
-
getElementWhere(
{String? name, String? id, List< String> ? attributeNames, List<XmlAttribute> ? attributes, bool matchAllAttributes = false, bool attributesMustBeIdentical = false, List<XmlNode> ? children, bool matchAllChildren = false, bool childrenMustBeIdentical = false}) → XmlElement? - Recursively checks all elements within the node tree and returns the first element found with properties matching those specified.
-
getLastChild(
String elementName) → XmlElement? -
Returns the last direct child named
elementName
. -
getLastChildWhere(
{String? name, String? id, List< String> ? attributeNames, List<XmlAttribute> ? attributes, bool matchAllAttributes = false, bool attributesMustBeIdentical = false, List<XmlNode> ? children, bool matchAllChildren = false, bool childrenMustBeIdentical = false}) → XmlElement? - Returns the last direct child with properties matching those specified.
-
getLastElement(
String elementName) → XmlElement? -
Recursively checks all elements within this node tree and
returns the last element found named
elementName
. -
getLastElementWhere(
{String? name, String? id, List< String> ? attributeNames, List<XmlAttribute> ? attributes, bool matchAllAttributes = false, bool attributesMustBeIdentical = false, List<XmlNode> ? children, bool matchAllChildren = false, bool childrenMustBeIdentical = false}) → XmlElement? - Recursively checks all elements within the node tree and returns the last element found with properties matching those specified.
-
getNthChild(
int index, String elementName) → XmlElement? -
Returns the nth direct child named
elementName
. -
getNthChildWhere(
int index, {String? name, String? id, List< String> ? attributeNames, List<XmlAttribute> ? attributes, bool matchAllAttributes = false, bool attributesMustBeIdentical = false, List<XmlNode> ? children, bool matchAllChildren = false, bool childrenMustBeIdentical = false}) → XmlElement? - Returns the nth direct child with properties matching those specified.
-
getNthElement(
int index, String elementName, {bool ignoreNestedMatches = true}) → XmlElement? -
Recursively checks all elements within this node tree and
returns the nth element found named
elementName
. -
getNthElementWhere(
int index, {String? name, String? id, List< String> ? attributeNames, List<XmlAttribute> ? attributes, bool matchAllAttributes = false, bool attributesMustBeIdentical = false, List<XmlNode> ? children, bool matchAllChildren = false, bool childrenMustBeIdentical = false}) → XmlElement? - Recursively checks all elements within the node tree and returns the nth element found with properties matching those specified.
-
hasChild(
String elementName) → bool -
Returns
true
if this element contains a direct child namedelementName
. -
hasChildWhere(
{String? name, String? id, List< String> ? attributeNames, List<XmlAttribute> ? attributes, bool matchAllAttributes = false, bool attributesMustBeIdentical = false, List<XmlNode> ? children, bool matchAllChildren = false, bool childrenMustBeIdentical = false}) → bool -
Returns
true
ifchildren
contains a direct child with properties matching those specified. -
hasElement(
String elementName) → bool -
Recursively checks all nested elements and returns
true
if one is found namedelementName
. -
hasElementWhere(
{String? name, String? id, List< String> ? attributeNames, List<XmlAttribute> ? attributes, bool matchAllAttributes = false, bool attributesMustBeIdentical = false, List<XmlNode> ? children, bool matchAllChildren = false, bool childrenMustBeIdentical = false, bool global = false}) → bool -
Recursively checks all nested elements and returns
true
if one is found with properties matching those specified. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
nthChild(
int index) → XmlElement? - Returns the nth XmlElement found in children.
-
toFormattedString(
{int nestingLevel = 0, String indent = '\t'}) → String -
Returns this node as a formatted string.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
compareValues(
XmlNode element, {String? name, String? id, List< String> ? attributeNames, List<XmlAttribute> ? attributes, bool matchAllAttributes = false, bool attributesMustBeIdentical = false, List<XmlNode> ? children, bool matchAllChildren = false, bool childrenMustBeIdentical = false}) → bool -
Compares
element
's values with the supplied values and returnstrue
if they match, orfalse
if they don't.