myTests/replace.R

library(XML)

top = xmlRoot(xmlTreeParse("replace.xml", useInternalNodes = TRUE))

top[[2]]
tmp = newXMLNode("duncan")
replaceNode(top[[2]], tmp)

saveXM(top)
omegahat/XML documentation built on Jan. 17, 2024, 6:47 p.m.