https://github.com/cran/XML
Raw File
Tip revision: ea445bf25ceb5476b459dbd5ab75691d86029121 authored by CRAN Team on 24 February 2022, 05:40:57 UTC
version 3.99-0.9
Tip revision: ea445bf
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