x <- read_xml("")
# return a
xml_node(x, "a")
# return b. requires the path to the node
xml_node(x, "a", "b")
xml_node_name("")
xml_node_name("", "a")
x <- read_xml("1")
xml_value(x, "a")
x <- read_xml("2")
xml_value(x, "a", "b")
x <- read_xml("1")
xml_attr(x, "a")
x <- read_xml("2")
xml_attr(x, "a", "b")
x <- read_xml("1")
xml_attr(x, "a")
x <- read_xml("")
xml_attr(x, "b", "a")
Run the code above in your browser using DataLab