I should parse many XML documents using the R software using the XML package (Duncan Temple Lang, 2013). Here is an example: http://musicbrainz.org/ws/2/release?query=%22A%20Is%20for%20Alpine%22%20AND%20artist:%22Alpine%22
If the link is copy-pasted in the address bar of a browser, an XML page is displayed and its correctness has been checked with one of the many online validators. The http://validator.w3.org has been chosen and the markup of the XML document seems valid.
However using this code:
library(XML)
url = "http://musicbrainz.org/ws/2/release?query=%22A%20Is%20for%20Alpine%22%20AND%20artist:%22Alpine%22"
data = xmlTreeParse(url, asTree = TRUE)
the following error is reported:
Blank needed here
Error: 1: Blank needed here
Now, the error is similar to the one discussed here Validation problem with XML declaration, but can't see how the error applies to the XML document I would to parse.
Software: R version 3.0.2 (2013-09-25) -- "Frisbee Sailing"
Platform: x86_64-unknown-linux-gnu (64-bit)
XML package version 3.98-1.1
Download the file first using RCurl, then you should have no problem: