myTests/addRootSibling.R

library(XML)
doc = newXMLDoc()
newXMLNode("svg", doc = doc)
tmp = newXMLPINode("xml-stylesheet", 'href="foo.css"')
xmlRoot(doc)
addSibling(xmlRoot(doc), tmp, after = FALSE)
doc
omegahat/XML documentation built on Jan. 17, 2024, 6:47 p.m.