Error when loading XML file - “Data at the root level is invalid”

When I try to load an XML file, I'm getting the error: "Data at the root level is invalid. Line 1, position 1.". Here's the relevant code:\[code\]string line;StreamReader file = new StreamReader(filepath);while ((line = file.ReadLine()) != null){ XDocument doc = XDocument.Load("http://api.discogs.com/release/" + line); //do processing}\[/code\]The way it works, is that I open a file in the streamreader which contains a list of release numbers, for example:\[code\]367315123456192837\[/code\]Then I want to append those one by one to the rest of the url, so that I can process many XML files at once. However, upon loading the XML I get the mentioned error. I've no idea what causes this. Is it well-formedness or the encoding? I hope anyone can help me out!
 
Top