需要用到 xml_find_all library(xml2) x <- read_xml("<a><b /><b><b /></b></a>") bees <- xml_find_all(x, "//b")#