inst/examples/internalNodes.S

library(XML)
tr <- xmlTree("Duncan")
tr$addTag("name", attrs=c(a=1,b="xyz"), close=FALSE)
tr$addTag("first", "Larry")
tr$addTag("last", "User")
tr$closeTag()

o = xmlRoot(tr$value())
as(o, "XMLNode")

Try the XML package in your browser

Any scripts or data that you put into this service are public.

XML documentation built on Nov. 3, 2023, 1:14 a.m.