addNode(node, parent, to, ...)
attrs
, namespace
, namespaceDefinitions
,
.children
.node
after it has been
coerced to be compatible with a flat tree, i.e. has an id and the
host tree added to it.xmlHashTree
asXMLTreeNode
tt = xmlHashTree()
top = addNode(xmlNode("top"), character(), tt)
addNode(xmlNode("a"), top, tt)
b = addNode(xmlNode("b"), top, tt)
c = addNode(xmlNode("c"), b, tt)
addNode(xmlNode("c"), top, tt)
addNode(xmlNode("c"), b, tt)
addNode(xmlTextNode("Some text"), c, tt)
xmlElementsByTagName(tt$top, "c")
tt
Run the code above in your browser using DataLab