I have having a tough time getting this to work more quickly. I do
want it to be read into a text doc before making it an xml doc for
troubleshooting purposes. the slow step is getting the text doc from
what i can tell.
Thanks.
[code]
//create a place to put input
string result = "";
//show format the url
String address = string.Format(_requestFormat, _key,
location);
Console.WriteLine(string.Format(_requestFormat, _key,
location));
// Create the web request
HttpWebRequest request = WebRequest.Create(address) as
HttpWebRequest;
// Get response
using (HttpWebResponse response = request.GetResponse
() as HttpWebResponse)
{
// Get the response stream
StreamReader reader = new StreamReader
(response.GetResponseStream());
// Read the whole contents and return as a
string
result = reader.ReadToEnd();
}
//show result;
Console.WriteLine("outputing data");
Console.WriteLine(result);
Console.WriteLine("end of data");
//store it
_result = result;
//get it into xml
XmlDocument doc = new XmlDocument();
doc.Load(new StringReader(result));
_xloc = doc;
[/code]