Remove the s from https
s
https
library(XML)fileURL<-"https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Frestaurants.xml"doc <- xmlTreeParse(sub("s", "", fileURL), useInternal = TRUE)class(doc)## [1] "XMLInternalDocument" "XMLAbstractDocument"
You can use RCurl to fetch the content and then XML seems to be able to handle it
RCurl
library(XML)library(RCurl)fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Frestaurants.xml"xData <- getURL(fileURL)doc <- xmlParse(xData)
xmlTreeParse does not support https.
You can load the data with getURL (from RCurl) and then parse it.
getURL