xml_name {xml2} | R Documentation |
The (tag) name of an xml element.
Description
The (tag) name of an xml element.
Modify the (tag) name of an element
Usage
xml_name(x, ns = character())
xml_name(x, ns = character()) <- value
xml_set_name(x, value, ns = character())
Arguments
x |
A document, node, or node set. |
ns |
Optionally, a named vector giving prefix-url pairs, as produced
by |
value |
a character vector with replacement name. |
Value
A character vector.
Examples
x <- read_xml("<bar>123</bar>")
xml_name(x)
y <- read_xml("<bar><baz>1</baz>abc<foo /></bar>")
z <- xml_children(y)
xml_name(xml_children(y))
[Package xml2 version 1.3.6 Index]