I am trying to read in an XML from the web located at: https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Frestaurants.xml
I am getting the following error in R:
Error: XML content does not seem to be XML: 'https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Frestaurants.xml'
My code:
install.packages("XML")
library(XML)
fileURL = "https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Frestaurants.xml"
doc = xmlTreeParse(fileURL)
I want to read that XML file and find out how many restaurants have zipcode 21231?
Thanks