XmlElement constructor

XmlElement(
  1. XmlName name, [
  2. Iterable<XmlAttribute> attributes = const [],
  3. Iterable<XmlNode> children = const [],
  4. bool isSelfClosing = true,
])

Creates an element node with the provided name, attributes, and children.

Implementation

XmlElement(
  this.name, [
  Iterable<XmlAttribute> attributes = const [],
  Iterable<XmlNode> children = const [],
  this.isSelfClosing = true,
]) {
  name.attachParent(this);
  this.attributes.initialize(this, attributeNodeTypes);
  this.attributes.addAll(attributes);
  this.children.initialize(this, childrenNodeTypes);
  this.children.addAll(children);
}