ElementBuilder
A fluent builder for constructing XML elements.
Accumulates attributes and children, allowing them to be added in any order via method chaining.
Value parameters
- attributes
-
Accumulated attributes
- children
-
Accumulated children
- name
-
The element name
Attributes
- Source
- XmlBuilder.scala
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Adds an attribute with a string name.
Adds an attribute with a string name.
Value parameters
- name
-
The attribute name
- value
-
The attribute value
Attributes
- Returns
-
A new ElementBuilder with the attribute added
- Source
- XmlBuilder.scala
Adds an attribute with an XmlName (possibly namespaced).
Adds an attribute with an XmlName (possibly namespaced).
Value parameters
- name
-
The attribute name (possibly with namespace)
- value
-
The attribute value
Attributes
- Returns
-
A new ElementBuilder with the attribute added
- Source
- XmlBuilder.scala
Builds and returns the final Element.
Builds and returns the final Element.
Attributes
- Returns
-
The constructed Xml.Element
- Source
- XmlBuilder.scala
Adds a single child node.
Adds a single child node.
Value parameters
- xml
-
The child node to add
Attributes
- Returns
-
A new ElementBuilder with the child added
- Source
- XmlBuilder.scala
Adds multiple child nodes.
Adds multiple child nodes.
Value parameters
- xmls
-
The child nodes to add
Attributes
- Returns
-
A new ElementBuilder with all children added
- Source
- XmlBuilder.scala
Adds a text node as a child.
Adds a text node as a child.
Value parameters
- value
-
The text content
Attributes
- Returns
-
A new ElementBuilder with the text node added
- Source
- XmlBuilder.scala
Inherited methods
An iterator over the names of all the elements of this product.
An iterator over the names of all the elements of this product.
Attributes
- Inherited from:
- Product
- Source
- Product.scala
An iterator over all the elements of this product.
An iterator over all the elements of this product.
Attributes
- Returns
-
in the default implementation, an
Iterator[Any] - Inherited from:
- Product
- Source
- Product.scala