asXMLTreeNode {XML} | R Documentation |
This coerces a regular R-based XML node (i.e. not an internal C-level
node) to a form that can be inserted into a flat tree, i.e.
one that stores the nodes in a non-hierarchical manner.
It is thus used in conjunction with
xmlHashTree
and
xmlFlatListTree
.
It adds id
and env
fields to the
node and specializes the class by prefixing className
to the class attribute.
asXMLTreeNode(node, env, id = get(".nodeIdGenerator", env)(xmlName(node)), className = "XMLTreeNode")
node |
the original XML node |
env |
the XMLFlatTree object into which this node will be inserted. |
id |
the identifier for the node in the flat tree. If this is not specified, we consult the tree itself and its built-in identifier generator. By default, the name of the node is used as its identifier unless there is another node with that name. |
className |
a vector of class names to be prefixed to the existing class vector of the node. |
An object of class className
, i.e. by default
"XMLTreeNode"
.
Duncan Temple Lang