Optionally add a number of children, when empty no child will be added
Optionally add a number of children, when empty no child will be added
Optionally add a child, when None no child will be added
Optionally add a single attribute, when None no attribute will be added
Add attributes
Optionally sets the tree to a single Text node child, replacing all others, None will not change the current node.
Optionally sets the tree to a single Text node child, replacing all others, None will not change the current node.
<(Elem("root"l)) ~> None
would leave an empty <root/>
sets the tree to a single Text node child, replacing all others, calling this forces the resulting OptionalDslBuilder to be non empty
Adds items and filters out empty trees.
Adds items and filters out empty trees.
Optionally add a single attribute, when None no attribute will be added
Add attributes
Optionally add a child, when None no child will be added
Optionally add a number of children, when empty no child will be added
Optionally add a number of children, when empty no child will be added
see ?~>
see ~> Option[String]
If all of the underly Elem is empty - no children or attributes then it returns None.
If all of the underly Elem is empty - no children or attributes then it returns None.
NB xsi:nil still counts as an attribute as it has an intended meaning.
Represents an optional cascading tree,
NB Must have a starting element, modelled as tree as we need to keep the data around and trees must always have an elem.