
Last chance! 50% off unlimited learning
Sale ends in
This is intended for use with XMLInternalNode
objects
which are direclty mutable (rather than changing a copy of the node
and having to insert that back into the larger tree.)
ensureNamespace(doc, what)
XMLInternalDocument
or XMLInternalNode
on
which the namespace is to be defined. If this is a documentm, we use
the root node.newXMLNamespace
newXMLNode
doc = newXMLDoc()
top = newXMLNode("article", doc = doc)
ensureNamespace(top, c(r = "http://www.r-project.org"))
b = newXMLNode("r:code", parent = top)
print(doc)
Run the code above in your browser using DataLab