url <- "http://www.stat.purdue.edu/~mdw/490M/cdcatalog.xml" doc <- xmlRoot(xmlTreeParse(url, useInternalNodes = TRUE))xpathSApply(doc, "//CATALOG/CD/PRICE", xmlValue)
I think this has got to do with resolution of namespaces. useInternalNodes = TRUE is required for xpath to use getNodeSet()