When I use xmlTreeParse function to parse an url
fileUrl <- "http://www.w3schools.com/xml/simple.xml"
doc <- xmlTreeParse(fileUrl,useInternal=TRUE)
and it response an error message
Unknown IO error failed to load external entity "http://www.w3schools.com/xml/simple.xml"
the url is good , I can download the file using browser
BUT
If I download the file first
the parse function seems to work good
> download.file("http://www.w3schools.com/xml/simple.xml",destfile = "simple.xml")
试开URL’http://www.w3schools.com/xml/simple.xml'
Content type 'text/xml' length 1119 bytes
==================================================
downloaded 1119 bytes
> doc <- xmlTreeParse("simple.xml",encoding = "ASCII", useInternalNodes = T )
rn <- xmlRoot(doc)
rn2 <- xmlToDataFrame(rn)
> rn2
name price description
1 Belgian Waffles $5.95 Two of our famous Belgian Waffles with plenty of real maple syrup
2 Strawberry Belgian Waffles $7.95 Light Belgian waffles covered with strawberries and whipped cream
3 Berry-Berry Belgian Waffles $8.95 Light Belgian waffles covered with an assortment of fresh berries and whipped cream
4 French Toast $4.50 Thick slices made from our homemade sourdough bread
5 Homestyle Breakfast $6.95 Two eggs, bacon or sausage, toast, and our ever-popular hash browns
calories
1 650
2 900
3 900
4 600
5 950
Can anyone tell my what this message mean and how to deal with it ?
thanks!