47 lines
1.0 KiB
C#
47 lines
1.0 KiB
C#
using System;
|
|
using System.Data;
|
|
using System.Configuration;
|
|
using System.Web;
|
|
using System.Web.Security;
|
|
using System.Xml;
|
|
|
|
|
|
namespace Mtxfw.Utility
|
|
{
|
|
/// <summary>
|
|
/// 配置文件读写类 By Telesa 2010.3.2
|
|
/// </summary>
|
|
public class emojiconsConfig
|
|
{
|
|
XmlDocument xd;
|
|
string Path = System.Web.HttpContext.Current.Server.MapPath("~/App_Data/emojicons.xml");
|
|
|
|
|
|
public emojiconsConfig()
|
|
{
|
|
xd = new XmlDocument();
|
|
xd.Load(Path);
|
|
}
|
|
|
|
|
|
public string getData(string name)
|
|
{
|
|
string output = "";
|
|
System.Xml.XmlNodeList xnl = xd.GetElementsByTagName("key");
|
|
System.Xml.XmlNodeList xnl2 = xd.GetElementsByTagName("string");
|
|
for (int i = 0; i < xnl.Count; i++)
|
|
{
|
|
if (xnl[i].InnerText == name)
|
|
{
|
|
output = xnl2[i].InnerText;
|
|
}
|
|
}
|
|
return output;
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
} |