x[["myTag"]] <- xmlNode("mySubTag")
.
x[i] <- value "[<-.XMLNode"(x, i, value) "[[<-.XMLNode"(x, i, value)
XMLNode
object to which the sub-node is to be assigned.
x
into which the right-hand-side node(s) should be assigned.
These can be either numbers or names.
XMLNode
objects which are to be the sub-nodes
of
x
.
x
containing the new or modified
nodes.
Duncan Templle Lang
http://www.w3.org, http://www.omegahat.org/RSXML
top <- xmlNode("top", xmlNode("next","Some text")) top[["second"]] <- xmlCDataNode("x <- 1:10") top[[3]] <- xmlNode("tag",attrs=c(id="name"))