BitrixAQA.General.Extensions.GetValue C# (CSharp) Method

GetValue() public static method

Метод возвращает значение опции из xml файла. Если опция не найдена вернется пустая строка
public static GetValue ( this doc, string xpath ) : string
doc this Документ XML
xpath string путь к ноде в формате xpath
return string
        public static string GetValue(this XmlDocument doc, string xpath)
        {
            if (doc.DocumentElement.SelectSingleNode(xpath) != null)
                return doc.SelectSingleNode(xpath).InnerText;
            else
                return "";
        }
Extensions