Root element is missing when load XmlDocument from a stream

It seems you're reading the response stream twice. It doesn't work that way, you get an empty string the second time. Either remove the line Console.WriteLine(response.ReadToEnd()); or save the response to a string:

string responseString = response.ReadToEnd();
…
Console.WriteLine(reponseString);
…
XmlDoc.LoadXml(responseString);

You should store the XML readers input in a string variable, since the second time the ReadToEnd() method is being called, it can not read anything from the stream, as it is already at the end and returns an empty string.

string responseString = response.ReadToEnd()