XmlConditional class
An XML Conditional Section.
- Inheritance
-
- Object
- XmlNode
- XmlNodeWithChildren
- XmlConditional
- Annotations
-
- @immutable
Constructors
-
XmlConditional({required String condition, required List<
XmlNode> children}) -
An XML Conditional Section.
const
Properties
-
children
→ List<
XmlNode> -
The node(s) contained within this conditional section.
final
- condition → String
-
The condition, it should equal
INCLUDE
,IGNORE
, or a reference to an XmlEntity.final - firstChild → XmlElement?
-
Returns the first XmlElement found in children.
no setterinherited
- hasChildren → bool
-
Returns
true
if children isn't null or empty.no setterinherited - hashCode → int
-
The hash code for this object.
no setteroverride
- lastChild → XmlElement?
-
Returns the last XmlElement found in children.
no setterinherited
- 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
.inherited -
getChildren(
String elementName, {int start = 0, int? stop}) → List< XmlElement> ? -
Returns all direct children named
elementName
.inherited -
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.
inherited
-
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.
inherited
-
getElement(
String elementName) → XmlElement? -
Recursively checks all elements within this node tree and
returns the first element found named
elementName
.inherited -
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
.inherited -
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.
inherited
-
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.
inherited
-
getLastChild(
String elementName) → XmlElement? -
Returns the last direct child named
elementName
.inherited -
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.
inherited
-
getLastElement(
String elementName) → XmlElement? -
Recursively checks all elements within this node tree and
returns the last element found named
elementName
.inherited -
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.
inherited
-
getNthChild(
int index, String elementName) → XmlElement? -
Returns the nth direct child named
elementName
.inherited -
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.
inherited
-
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
.inherited -
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.
inherited
-
hasChild(
String elementName) → bool -
Returns
true
if this element contains a direct child namedelementName
.inherited -
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.inherited -
hasElement(
String elementName) → bool -
Recursively checks all nested elements and returns
true
if one is found namedelementName
.inherited -
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.inherited -
loadExternalDtd(
) → Future< void> - Attempts to load all external DTD references contained within any nested XmlDoctypes and XmlEntitys, load the pages they reference, and parse the DTD elements contained within.
-
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.
inherited
-
toFormattedString(
{int nestingLevel = 0, String indent = '\t', bool encodeCharacterEntities = true, String? encodeCharacters, bool doubleQuotes = true}) → String -
Returns this node as a formatted string.
override
-
toString(
{bool encodeCharacterEntities = true, String? encodeCharacters, bool doubleQuotes = true}) → String -
Returns this conditional section as an unformatted XML string.
override
Operators
-
operator ==(
Object o) → bool -
The equality operator.
override
Static Methods
-
from(
String string, {bool parseCharacterEntities = true, bool parseComments = false, bool trimWhitespace = true, bool parseCdataAsText = true}) → XmlConditional? -
Returns the first XML conditional section found in
string
.string
must not benull
.override -
ignore(
List< XmlNode> children) → XmlConditional -
Returns an XmlConditional with the condition set to
IGNORE
. -
include(
List< XmlNode> children) → XmlConditional -
Returns an XmlConditional with the condition set to
INCLUDE
. -
parseString(
String string, {bool parseCharacterEntities = true, bool parseComments = false, bool trimWhitespace = true, bool parseCdataAsText = true, bool global = false, int start = 0, int? stop}) → List< XmlConditional> ? -
Returns a list of all XML conditional sections found in
string
.string
must not benull
.override