myTests/nsAttributes.R

library(XML)

NS = c(r = 'http://www.r-project.org',
       omg = 'http://www.omegahat.org')
top = newXMLNode("top", namespaceDefinitions = NS)

newXMLNode("bob", attrs = c('r:length' = 3, abc = "true"), parent = top)

names(attr(xmlAttrs(top[[1]]), "namespaces"))[1] == NS["r"]
omegahat/XML documentation built on Jan. 17, 2024, 6:47 p.m.