I am trying to get this XML file, but am unable to. I checked the other solutions in the same topic, but I couldn't understand. I am a R newbie.
> library(XML)
> fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Frestaurants.xml"
> doc <- xmlTreeParse(fileURL,useInternal=TRUE)
Error: XML content does not seem to be XML: 'https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Frestaurants.xml'
Can you please help?
Answer is at http://www.omegahat.net/RCurl/installed/RCurl/html/getURL.html. Key point is to use ssl.verifyPeer=FALSE with getURL if certificate error is shown.
If ssl or https capability is not shown by libcurl functions, check using Rcurl with HTTPs.
xmlTreeParse does not support https.
You can load the data with
getURL
(fromRCurl
) and then parse it.You can use
RCurl
to fetch the content and then XML seems to be able to handle itRemove the
s
fromhttps