Kaya 0.5.3 reference for ElementTreeData::ElementTree

List of functions and data types in ElementTreeData

ElementTreeData::ElementTree

Constructors

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>
kaya@kayalang.org | Last modified 29 November 2011 | Supported by Durham CompSoc | Powered by Kaya