xml_add_sibling()
and xml_add_child()
are used to insert a node
as a sibling or a child. xml_add_parent()
adds a new parent in
between the input node and the current parent. xml_replace()
replaces an existing node with a new node. xml_remove()
removes a
node from the tree.
xml_replace(.x, .value, ..., .copy = TRUE)
xml_add_sibling(.x, .value, ..., .where = c("after", "before"), .copy = TRUE)
xml_add_child(.x, .value, ..., .where = length(xml_children(.x)), .copy = TRUE)
xml_add_parent(.x, .value, ...)
xml_remove(.x, free = FALSE)
.value
before replacing. If this is FALSE
then the node will be moved from it's current location.xml_add_child
the position
after which to add, use 0
for the first child. For
xml_add_sibling
either "befeore" or "after"
indicating if the new node should be before or after .x
.xml_remove()
,