Esempio n. 1
0
 public static XmlNode SelectSingleNodeXpath(XmlNode node, string xpath)
 {
     if (!IsSelectSingleNodeUndefined(node))
     {
         return(node.SelectSingleNode(xpath));
     }
     else
     {
         XPathEvaluator xpe       = new XPathEvaluator();
         XPathResult    xPathNode = xpe.Evaluate(xpath, node, NSResolver, 9, null); // FIRST_ORDERED_NODE_TYPE = 9
         return((xPathNode != null) ? xPathNode.SingleNodeValue : null);
     }
 }
Esempio n. 2
0
 public static XmlNode SelectSingleNodeXpath(XmlNode node, string xpath)
 {
     if (!IsSelectSingleNodeUndefined(node))
        {
         return node.SelectSingleNode(xpath);
        }
        else
        {
        XPathEvaluator xpe = new XPathEvaluator();
        XPathResult xPathNode = xpe.Evaluate(xpath, node, NSResolver, 9, null); // FIRST_ORDERED_NODE_TYPE = 9
        return (xPathNode != null) ? xPathNode.SingleNodeValue : null;
        }
 }