ElementTreeData::ElementTree
Constructors
- ElementTree([ElementTreeData::Element] elements,String name,Dict::TinyDict<String, String> attributes)
Usage
This data type represents a node in the tree and its descendants (in XML, an element and its contents). The elements field is a list of the descendant Elements, the name field is the name of the element, and the attributes field is a dictionary of attribute names and values.
attrs = newTiny();
add(attrs,"title","Hello");
el = ElementTree(subs,"example",attrs);
// converts to a string as
// <example title="Hello">...contents of subs here...</example>