XmlBuilder class

A builder to create XML trees with code.

Constructors

XmlBuilder({bool optimizeNamespaces: false})
Construct a new XmlBuilder. [...]

Properties

optimizeNamespaces bool
If optimizeNamespaces is true, the builder will perform some namespace optimization. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

attribute(String name, Object value, {String namespace, XmlAttributeType attributeType}) → void
Adds a XmlAttribute node with the provided name and value. [...]
build() XmlNode
Return the resulting XmlNode.
cdata(Object text) → void
Adds a XmlCDATA node with the provided text. [...]
comment(Object text) → void
Adds a XmlComment node with the provided text. [...]
element(String name, {String namespace, Map<String, String> namespaces: const {}, Map<String, String> attributes: const {}, bool isSelfClosing: true, Object nest}) → void
Adds a XmlElement node with the provided tag name. [...]
namespace(String uri, [String prefix]) → void
Binds a namespace prefix to the provided uri. The prefix can be omitted to declare a default namespace. Throws an ArgumentError if the prefix is invalid or conflicts with an existing declaration.
processing(String target, Object text) → void
Adds a XmlProcessing node with the provided target and text. [...]
text(Object text) → void
Adds a XmlText node with the provided text. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited