/// <summary>
/// 读取配置文件
/// </summary>
/// <param name="Target"></param>
/// <param name="ConfigPathName"></param>
/// <returns></returns>
static internal string GetConfigValue(string Target, string XmlPath)
{
System.Xml.XmlDocument xdoc = new XmlDocument();
xdoc.Load(XmlPath);
XmlElement root = xdoc.DocumentElement;
XmlNodeList elemList = root.GetElementsByTagName(Target);
return elemList[0].InnerXml;
}
读取配置文件的节点内容
最新推荐文章于 2025-01-22 19:19:56 发布
本文介绍了一种通过XML路径读取指定目标配置信息的方法。利用C#中的System.Xml命名空间,该方法能够加载XML文件,并从文件中获取特定节点的内联文本。
1044

被折叠的 条评论
为什么被折叠?



