Learn R Programming

XML (version 1.2-0)

asXMLTreeNode: Convert a regular XML node to one for use in a "flat" tree

Description

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.

Usage

asXMLTreeNode(node, env, id = get(".nodeIdGenerator", env)(xmlName(node)), className = "XMLTreeNode")

Arguments

Value

  • An object of class className, i.e. by default "XMLTreeNode".

concept

XML

References

http://www.w3.org/XML

See Also

xmlHashTree xmlFlatListTree