我尝试从下面的URL中的xml文件中提取zipcodes(参见代码)。
fileurl <- "http://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Frestaurants.xml"
doc <- xmlTreeParse(fileurl)
root <- xmlRoot(doc)
xmlName(root)
xmlSApply(root, function(x) xmlSApply(x, xmlValue))
但是,我似乎无法获取邮政编码并将其放入数据框中。