public class FormatXML
{
/// <summary>
/// Read the xml file to string
/// </summary>
/// <param name="fileName">full file path</param>
/// <returns></returns>
public string ReadXmlFile(string fileName)
{
string xmlString = System.IO.File.ReadAllText(fileName);
return xmlString;
}
/// <summary>
/// Replace special characters from xml file
/// </summary>
/// <param name="fileName">full file path</param>
/// <returns></returns>
public string ReplaceSpecialChar(string fileName)
{
string xmlString = ReadXmlFile(fileName);
xmlString = xmlString.Replace("<", "<").Replace(">", ">");
return xmlString;
}
}
{
/// <summary>
/// Read the xml file to string
/// </summary>
/// <param name="fileName">full file path</param>
/// <returns></returns>
public string ReadXmlFile(string fileName)
{
string xmlString = System.IO.File.ReadAllText(fileName);
return xmlString;
}
/// <summary>
/// Replace special characters from xml file
/// </summary>
/// <param name="fileName">full file path</param>
/// <returns></returns>
public string ReplaceSpecialChar(string fileName)
{
string xmlString = ReadXmlFile(fileName);
xmlString = xmlString.Replace("<", "<").Replace(">", ">");
return xmlString;
}
}
No comments:
Post a Comment