XML Document not loading from web URL - NullReferenceException
<p>I want to load weather information from openweathermap.org's API as an XML document.</p>

<pre><code>public Weather()
    {
        /* Generates custom weather URL */
        this.UrlStub= @"http://api.openweathermap.org/data/2.5/forecast/daily?q=";
        this.Location = "glasgow,uk";
        this.ApiKey = "&amp;APPID=6911e84eacde075fdbdfaf05b9a2aaf5";
        this.Mode = "&amp;mode=xml";
        this.ForecastWeatherUrl = urlStub + location + apiKey + mode;
    }
public bool loadXML()
    {
        /* Loads XML info from web */
        try
        {
            this.ForecastWeatherXml.LoadXml(ForecastWeatherUrl);
            return true;
        }
        catch (System.NullReferenceException ex)
        {
            Console.Out.WriteLine("Error loading xml Doc\n" + ex.StackTrace);
            return false;
        }
    }
private void loadWeatherBtn_Click(object sender, EventArgs e)
    {
        Weather weather = new Weather();
        Console.Out.WriteLine(weather); // prints generated xml URL
        if (weather.loadXML())
        {
            Console.Out.WriteLine("XML Loaded");
        }
</code></pre>

<p>The loadWeatherBtn_Click method is part of a different class. The output is:</p>

<pre><code>&gt; Weather URL: http://api.openweathermap.org/data/2.5/forecast/daily?q=glasgow,uk&amp;APPID=6911e84eacde075fdbdfaf05b9a2aaf5&amp;mode=xml
Error loading xml Doc
   at Al_Fresgow.Weather.loadXML() in C:\ROOTDIRECTORY\APPNAME\APPNAME\Weather.cs:line 163
</code></pre>

<p>The generated URL shown in the output works correctly so why isn't this loading?? Does the program need to wait for it to load first (calculation time for xml doc is only 0.0085 secs)?</p>