private XDocument GetXDocument(string url) { Uri uri = new Uri(url); System.Net.WebClient wb = new System.Net.WebClient(); wb.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials; MemoryStream ms = new MemoryStream(wb.DownloadData(uri)); System.Xml.XmlTextReader rdr = new System.Xml.XmlTextReader(ms); XDocument doc = XDocument.Load(rdr); return doc; }