Use
html <- getURL(url, httpheader = c(Accept = "text/xml"))
with specified content-type to get XML with curl.
A little clarification. The service provides both XML and JSON data formats, with the default of JSON. Your browser sends text/xml
(among others) in Accept
header with request, thus service returns XML. The curl (by default) doesn't send anything so, service returns JSON format, which is a default type.