/// <summary>
/// 根据文件路径 读取xml文本
/// </summary>
/// <param name="xmlFilePath"></param>
/// <returns></returns>
public string ReadTXTByFileName(string FilePath)
{
string strMsg = string.Empty;
try
{
XmlDocument doc = new XmlDocument();
doc.Load(System.Web.HttpContext.Current.Server.MapPath(FilePath));
strMsg = doc.InnerXml;
//读取文本内容(txt内容)
//FileInfo fi = new FileInfo(System.Web.HttpContext.Current.Server.MapPath(FilePath));
//StreamReader sr = fi.OpenText();
//strMsg = sr.ReadToEnd();
//sr.Close();
}
catch (Exception ex)
{
strMsg = "Error";
}
return strMsg;
}