I am trying to download weather data, similar to the question asked here: [How to parse XML to R data frame](https://stackoverflow.com/questions/17198658/how-to-parse-xml-to-r-data-frame)
but when I run the first line in the example, I get "Error: 1: failed to load HTTP resource". I've checked that the URL is valid. Here is the line I'm referring to:

```
data <- xmlParse("http://forecast.weather.gov/MapClick.php?lat=29.803&lon=-82.411&FcstType=digitalDWML")

```

I've managed to find a work around with the following, but would like to understand why the first line didn't work.

```
testfile <- "G:/Self Improvement/R Working Directory/test.xml"
url <- "http://forecast.weather.gov/MapClick.php?lat=29.803&lon=-82.411&FcstType=digitalDWML"
download.file(url, testfile, mode="wb") # get data into test
data <- xmlParse(testfile)

```

Appreciate any insights.