title: How to read XML from the internet using a Web Proxy?
body: <p>This is a follow-up to this question: <a href="https://stackoverflow.com/questions/4647957/how-to-load-xml-into-a-datatable">How to load XML into a DataTable?</a></p>
  
  <p>I want to read an XML file on the internet into a DataTable. The XML file is here: <a href="http://rates.fxcm.com/RatesXML" rel="nofollow noreferrer">http://rates.fxcm.com/RatesXML</a></p>
  
  <p>If I do:</p>
  
  <pre><code>public DataTable GetCurrentFxPrices(string url)
  {
      WebProxy wp = new WebProxy("http://mywebproxy:8080", true);
      wp.Credentials = CredentialCache.DefaultCredentials;
      WebClient wc = new WebClient();
      wc.Proxy = wp;
      MemoryStream ms = new MemoryStream(wc.DownloadData(url));
      DataSet ds = new DataSet("fxPrices");
      ds.ReadXml(ms);
      DataTable dt = ds.Tables["Rate"];
      return dt;
  }
  </code></pre>
  
  <p>It works fine. I'm struggling with how to use the default proxy set in Internet Explorer. I don't want to hard-code the proxy. I also want the code to work if no proxy is specified in Internet Explorer.</p>