Hi friends,
Here is the simple code for converting xml to string.
string strXML = "";
StringReader reader = new StringReader("C:\\test.xml");
XmlDocument doc = new XmlDocument();
doc.Load(reader);
if (doc != null)
{
StringWriter writer = new StringWriter();
doc.Save(writer);
strXML = writer.ToString();
}
doc = null;
...S.VinothkumaR.
3 comments:
Thank you, very useful
Thank you very much..!
Which namespace should be used? I cannot use "StringReader" and "StringWriter".
Post a Comment