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); } }
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; } }