R: Modify a tree by inserting, replacing or removing nodes
xml_replace
R Documentation
Modify a tree by inserting, replacing or removing nodes
Description
xml_add_sbling() and xml_add_child() are used to insert a node
as a sibling or a child. xml_replace() replaces an existing node with
a new node. xml_remove() removes a node from the tree.
If named attributes or namespaces to set on the node, if unnamed
text to assign to the node.
.copy
whether to copy the .value before replacing. If this is FALSE
then the node will be moved from it's current location.
.where
whether to add .value before or after .x.
free
When removing the node also free the memory used for that node.
Note if you use this option you cannot use any existing objects pointing to
the node or its children, it is likely to crash R or return garbage.