AuScGen.BaseSetings.GetValue C# (CSharp) Метод

GetValue() защищенный статический Метод

protected static GetValue ( string XMLPath, string key ) : string
XMLPath string
key string
Результат string
        protected static string GetValue(string XMLPath, string key)
        {
            XmlDocument xmlDoc = GetXmlDoc(XMLPath);
            XmlNodeList settingList = xmlDoc.SelectNodes("/TestSettings/TestSetting");
            foreach (XmlNode valueNode in settingList)
            {
                if (valueNode.FirstChild.Name.Equals(key))
                {
                    return valueNode.FirstChild.InnerText;
                }
            }
            //return xmlDoc.SelectNodes("/TestSettings/TestSetting");
            return null;
        }