代码修改后的版本,全部提交
This commit is contained in:
47
Mtxfw.Utility/emojiconsConfig.cs
Normal file
47
Mtxfw.Utility/emojiconsConfig.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user