Пример #1
0
        public static string GetChildValue(XPathNavigator nav, string childPath)
        {
            string         str            = (string)null;
            XPathNavigator xpathNavigator = XPathNavUtil.SelectSingleChild(nav, childPath);

            if (xpathNavigator != null)
            {
                str = xpathNavigator.Value;
            }
            return(str);
        }
Пример #2
0
 public static XPathNavigator SelectSingle(
     XPathNavigator nav,
     string XPath,
     string nodeValue)
 {
     if (nav == null)
     {
         throw new ArgumentNullException(nameof(nav));
     }
     return(XPathNavUtil.FindNavigator(nav.Select(XPath), nodeValue));
 }