inst/examples/faq.R

# Getting the question text from a FAQ.
doc = xmlParse("FAQ.xml")
q = getNodeSet(doc, "//question")
sapply(q, function(x) paste(sapply(xmlChildren(x)[names(x) == "text"], xmlValue), collapse = "\n"))

Try the XML package in your browser

Any scripts or data that you put into this service are public.

XML documentation built on Nov. 3, 2023, 1:14 a.m.