Last post Jul 20, 2011 09:40 PM by Decker Dong - MSFT
Jul 19, 2011 03:45 AM|3fifteenAppel|LINK
Please could someone advise or give suggestions on the following problem: I am trying to read values from an XML document hosted on a web server. The value of one of the nodes needs to be read in order to perform a calculation. This value can however be
a negative value.
Both WebClient and HttpWebRequest have been tested but all negative values are automatically changed to 0.00. Both process were used to read the Xml into a stream and both code examples are shown below
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(http://url);
req.ContentType = "text/html";
HttpWebResponse res = (HttpWebResponse)req.GetResponse();
Encoding enc = Encoding.GetEncoding(1252);
StreamReader reader = new StreamReader(res.GetResponseStream(), enc);
WebClient Client = new WebClient();Stream stream = Client.OpenRead("http://url");
Jul 20, 2011 09:40 PM|Decker Dong - MSFT|LINK
Please offer us the link of your URL in details so as to let us have a try to help you.