Description Usage Arguments Value Author(s) References See Also Examples
Each XMLNode object has an element or tag name introduced
in the <name ...>
entry in an XML document.
This function returns that name.
We can also set that name using xmlName(node) <- "name"
and the value can have an XML name space prefix, e.g.
"r:name"
.
1 |
node |
The XMLNode object whose tag name is being requested. |
full |
a logical value indicating whether to prepend the
namespace prefix, if there is one, or return just the
name of the XML element/node. |
A character vector of length 1
which is the node$name
entry.
Duncan Temple Lang
http://www.w3.org/XML, http://www.jclark.com/xml, http://www.omegahat.org
xmlChildren
,
xmlAttrs
,
xmlTreeParse
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | fileName <- system.file("exampleData", "test.xml", package="XML")
doc <- xmlTreeParse(fileName)
xmlName(xmlRoot(doc)[[1]])
tt = xmlRoot(doc)[[1]]
xmlName(tt)
xmlName(tt) <- "bob"
# We can set the node on an internal object also.
n = newXMLNode("x")
xmlName(n)
xmlName(n) <- "y"
xmlName(n) <- "r:y"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.