110,539
社区成员
发帖
与我相关
我的任务
分享
public static string ReadXmlReturnNode(string XmlPath,string Node)
{
XmlDocument docXml = new XmlDocument();
docXml.Load(@XmlPath);
XmlNodeList xn = docXml.GetElementsByTagName(Node);
return xn.Item(0).InnerText.ToString();
}
string server = XmlObject.ReadXmlReturnNode("config.xml", "server");