require_once "XML/Tree.php";
object XML_Tree_Node XML_Tree::&addRoot (string $name [, string $content='' [, array $attributes=array()]])
object XML_Tree_Node XML_Tree::&addRoot
Adds a new root node to the XML datastructure.
string $name - name of root element
string $content - data between the opening and closing tag
array $attributes - additional attributes for the tag. The attribute name is represented as the array key and the attribute value as entry for the key.
object XML_Tree_Node - reference to root node
This function can not be called statically.
Example 59-1. Using &addRoot()
$tree = new XML_Tree; $root =& $tree->addRoot("root");