# add single node
xml_node <- "openxlsx2"
xml_attr <- c(qux = "quux")
# "openxlsx2"
xml_attr_mod(xml_node, xml_attr)
# update node and add node
xml_node <- "openxlsx2"
xml_attr <- c(foo = "baz", qux = "quux")
# "openxlsx2"
xml_attr_mod(xml_node, xml_attr)
# remove node and add node
xml_node <- "openxlsx2"
xml_attr <- c(foo = "", qux = "quux")
# "openxlsx2"
xml_attr_mod(xml_node, xml_attr)
Run the code above in your browser using DataLab