x <- read_xml("This is some text. This is bold!")
xml_text(x)
xml_text(xml_children(x))
x <- read_xml("This is some text. This is some nested text.")
xml_text(x)
xml_text(xml_find_all(x, "//x"))
x <- read_xml(" Some text ")
xml_text(x, trim = TRUE)
# xml_double() and xml_integer() are useful for extracting numeric attributes
x <- read_xml("")
xml_integer(xml_find_all(x, "//@x"))
Run the code above in your browser using DataLab