Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Mar 01, 2012 10:04 AM|LINK
Hi, As I believe Thread poster wants to share his solution wich was initially raised by him here :
Dut to some techincal issues, he could not post that there. So started a new thread to share his solution here at forum. ;)
Hi Jbear, please marked your thread As resolved As you already posted solution.
For a reference again, i am providing relevant code again here:
System.Net.WebRequest request = System.Net.WebRequest.Create(uri);
System.Net.WebResponse response = request.GetResponse();
Stream stream = response.GetResponseStream();
StreamReader sr = new StreamReader(stream);
string xmlcontents = sr.ReadToEnd();
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
XmlNamespaceManager xnm = new XmlNamespaceManager(doc.NameTable);
totalresults.Text = "Results: " + doc.SelectSingleNode("SearchResponse/web:Web/web:Total", xnm).InnerText;
Hi Kavita, I think XML is well formatted but YES, namesapces are missing there. Hence, we need to include namesapces dynamically over there. After that we can process.
Correct Me, If I am Wrong!!!