append.xmlNode {XML} | R Documentation |
This appends one or more XML nodes as children of an existing node.
append.XMLNode(to, ...) append.xmlNode(to, ...)
to |
the XML node to which the sub-nodes are to be added. |
... |
the sub-nodes which are to be added to the to node.
If this is a list of XMLNode objects (e.g. create by a call to
lapply ), then that list is used. |
The original to
node containing its new children nodes.
Duncan Temple Lang
http://www.w3.org/XML, http://www.jclark.com/xml, http://www.omegahat.org
[<-.XMLNode
[[<-.XMLNode
[.XMLNode
[[.XMLNode
## Not run: tmp <- lapply(references, function(i) { if(!inherits(i, "XMLNode")) i <- xmlNode("reference", i) i }) r[["references"]] <- append.xmlNode(r[["references"]],tmp) ## End(Not run)