如何将读取XML配置文件的操作转化为一个长尾?
- 内容介绍
- 文章标签
- 相关推荐
本文共计189个文字,预计阅读时间需要1分钟。
读取配置文件信息,配置文件服务程序当前路径下GisServiceConfig.xml节点名称为GetConfigValue,节点值public static string
读取配置文件信息,配置文件服务器程序当前路径下GisServiceConfig.xmlXML节点名称节点值publicstaticstringGetConfigVa///
///读取配置文件信息,配置文件服务器程序当前路径下GisServiceConfig.xml
///
///XML节点名称
///节点
public static string GetConfigValue(string p_key)
{
XmlDocument doc = new XmlDocument();
string cOnfig= "";
string xmlPath = AppDomain.CurrentDomain.BaseDirectory"GisServiceConfig.xml"; //获取"GisServiceConfig.xml"文件的路径
doc.Load(xmlPath);
if(!xmlPath)
{
XElement element = XElement.Parse(doc.InnerXml);
cOnfig= element.Element(p_key).Value;
return config;
}
else
{
return "":
}
}
读取.XML配置文件,布布扣,bubuko.com
本文共计189个文字,预计阅读时间需要1分钟。
读取配置文件信息,配置文件服务程序当前路径下GisServiceConfig.xml节点名称为GetConfigValue,节点值public static string
读取配置文件信息,配置文件服务器程序当前路径下GisServiceConfig.xmlXML节点名称节点值publicstaticstringGetConfigVa///
///读取配置文件信息,配置文件服务器程序当前路径下GisServiceConfig.xml
///
///XML节点名称
///节点
public static string GetConfigValue(string p_key)
{
XmlDocument doc = new XmlDocument();
string cOnfig= "";
string xmlPath = AppDomain.CurrentDomain.BaseDirectory"GisServiceConfig.xml"; //获取"GisServiceConfig.xml"文件的路径
doc.Load(xmlPath);
if(!xmlPath)
{
XElement element = XElement.Parse(doc.InnerXml);
cOnfig= element.Element(p_key).Value;
return config;
}
else
{
return "":
}
}
读取.XML配置文件,布布扣,bubuko.com

