/// <include file='doc\XmlNode.uex' path='docs/doc[@for="XmlNode.SelectSingleNode1"]/*' /> /// <devdoc> /// <para>Selects the first node that matches the xpath expression and given namespace context.</para> /// </devdoc> public XmlNode SelectSingleNode(string xpath, XmlNamespaceManager nsmgr) { XPathNavigator xn = (this).CreateNavigator(); XPathExpression exp = xn.Compile(xpath); exp.SetContext(nsmgr); try { XmlNodeList list = new XPathNodeList(xn.Select(exp));; return(list[0]); } catch (ArgumentOutOfRangeException) { return(null); } }
public XmlNodeListEnumerator(XPathNodeList list) { _list = list; _index = -1; _valid = false; }
public XmlNodeListEnumerator(XPathNodeList list) { this.list = list; this.index = -1; this.valid = false; }