Assign sub-nodes to an XML node
AssignXMLNode.RdThese functions allow one to assign a sub-node
to an existing XML node by name or index.
These are the assignment equivalents of the
subsetting accessor functions.
They are typically called indirectly
via the assignment operator, such as
x[["myTag"]] <- xmlNode("mySubTag").
Usage
# S3 method for class 'XMLNode'
x[i] <- value
# S3 method for class 'XMLNode'
x[i] <- value
# S3 method for class 'XMLNode'
x[[i]] <- valueExamples
top <- xmlNode("top", xmlNode("next","Some text"))
top[["second"]] <- xmlCDataNode("x <- 1:10")
top[[3]] <- xmlNode("tag",attrs=c(id="name"))