Following is a code sample in C#.net which shows how to change the encoding of an XML file
from code behind
string fileName = Server.MapPath("XMLFile10.xml");
XmlDocument xDoc = new XmlDocument();
xDoc.Load(fileName);
if (xDoc.FirstChild.NodeType == XmlNodeType.XmlDeclaration)
{
((XmlDeclaration)xDoc.FirstChild).Encoding = "utf-8";
}
string xStr = xDoc.OuterXml;
//If you want to save it as rss file you can do this
xDoc.Save(Server.MapPath("myRSS.rss"));
//xDoc.Save(Server.MapPath("myRSS.xml"));
This is great. Thanks kavita
ReplyDelete--vamsi
-- http://webclip.in/user/vamsi
its possible to share point server
ReplyDelete