https://github.com/cran/XML
Raw File
Tip revision: 4290c36165416096276efc099b90aebd5514e32c authored by CRAN Team on 03 October 2022, 07:46:01 UTC
version 3.99-0.11
Tip revision: 4290c36
newNodes.R
b = newXMLNode("k:bob", namespace = c(r = "http://www.r-project.org", omg = "http://www.omegahat.net", ""))
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)
back to top