C#使用XmlDocument通过XPath获取单个节点的值
public static Survey GetSurvey(string groupName, string surveyName) { XmlDocument xmlSurveys = new XmlDocument(); xmlSurveys.Load(filename); XmlNode xmlNode = (XmlNode) xmlSurveys.SelectNodes("//Survey[@name='"+surveyName+"']").Item(0); ... }