XMLNode class

Implementers

Constructors

XMLNode({required String tag, Map<String, dynamic> attributes = const <String, dynamic>{}, List<XMLNode> children = const [], bool closeTag = true, String? text, bool isDeclaration = false})
XMLNode.fromString(String str)
Just for testing purposes
factory
XMLNode.fromXmlElement(XmlElement element)
Because this API is better ;) Don't use in production. Just for testing
factory
XMLNode.xmlns({required String tag, required String xmlns, Map<String, String> attributes = const <String, String>{}, List<XMLNode> children = const [], bool closeTag = true, String? text})

Properties

attributes ↔ Map<String, dynamic>
getter/setter pair
children ↔ List<XMLNode>
getter/setter pair
closeTag ↔ bool
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
isDeclaration ↔ bool
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tag → String
final
text ↔ String?
getter/setter pair
xmlns → String?
no setter

Methods

addChild(XMLNode child) → void
Adds a child to this node.
findTags(String tag, {String? xmlns}) → List<XMLNode>
Returns all children whose tag is equal to tag.
findTagsByXmlns(String xmlns) → List<XMLNode>
firstTag(String tag, {String? xmlns}) → XMLNode?
Returns the first xml node that matches the description:
firstTagByXmlns(String xmlns) → XMLNode?
Returns the first child whose xmlns attribute is equal to xmlns. Returns null if none is found.
innerText() → String
Returns the inner text of the node. If none is set, returns the "".
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
renderAttributes() → String
Renders the attributes of the node into "attr1="value" attr2=...".
toString() → String
A string representation of this object.
inherited
toXml() → String
Renders the entire node, including its children, into an XML string.

Operators

operator ==(Object other) → bool
The equality operator.
inherited