inst/examples/newNodes.R

b = newXMLNode("k:bob", namespace = c(r = "http://www.r-project.org", omg = "http://www.omegahat.org", ""))
addAttributes(b, a = 1, b = "xyz", "r:efg" = "2.4.1", "omg:len" = 3)

xmlName(b)
xmlName(b) <- "jane"

saveXML(b)

removeAttributes(b, "r:efg")

removeAttributes(b, "a", "b")  # or .attrs = c("a", "b")
saveXML(b)
cosmicexplorer/xmlr documentation built on May 30, 2019, 8:28 a.m.