pugixml | R Documentation |
returns xml values as character
xml_node(xml, level1 = NULL, level2 = NULL, level3 = NULL, ...)
xml_node_name(xml, level1 = NULL, level2 = NULL, ...)
xml_value(xml, level1 = NULL, level2 = NULL, level3 = NULL, ...)
xml_attr(xml, level1 = NULL, level2 = NULL, level3 = NULL, ...)
xml |
something xml |
level1 |
to please check |
level2 |
to please check |
level3 |
to please check |
... |
additional arguments passed to |
This function returns XML nodes as used in openxlsx2. In theory they could be returned as pointers as well, but this has not yet been implemented. If no level is provided, the nodes on level1 are returned
x <- read_xml("<a><b/></a>")
# return a
xml_node(x, "a")
# return b. requires the path to the node
xml_node(x, "a", "b")
xml_node_name("<a/>")
xml_node_name("<a><b/></a>", "a")
x <- read_xml("<a>1</a>")
xml_value(x, "a")
x <- read_xml("<a><b r=\"1\">2</b></a>")
xml_value(x, "a", "b")
x <- read_xml("<a a=\"1\" b=\"2\">1</a>")
xml_attr(x, "a")
x <- read_xml("<a><b r=\"1\">2</b></a>")
xml_attr(x, "a", "b")
x <- read_xml("<a a=\"1\" b=\"2\">1</a>")
xml_attr(x, "a")
x <- read_xml("<b><a a=\"1\" b=\"2\"/></b>")
xml_attr(x, "b", "a")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.