vipin saini

vipin saini

  • NA
  • 88
  • 0

create xml from http webresponce

Sep 24 2010 9:08 AM

hi,
i am getting web responce and able to print on web browser but not creating a xml document , iam using the code
WebResponse resp = req.GetResponse();
stm = resp.GetResponseStream();
StreamReader r = new StreamReader(stm);
// process SOAP return doc here. For now, we'll just send the XML out to the browser ...
Response.Write(r.ReadToEnd());
string res = r.ReadToEnd();

XmlDocument docr = new XmlDocument();
docr.Load(res);
docr.Save(Server.MapPath(
"categories1.xml"));
plz help me.