Inheritance: XmlNodeList
コード例 #1
0
ファイル: xmlnode.cs プロジェクト: ydunk/masters
        /// <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);
            }
        }
コード例 #2
0
ファイル: XPathNodeList.cs プロジェクト: karthikrajkumar/demo
 public XmlNodeListEnumerator(XPathNodeList list)
 {
     _list  = list;
     _index = -1;
     _valid = false;
 }
コード例 #3
0
 public XmlNodeListEnumerator(XPathNodeList list)
 {
     this.list  = list;
     this.index = -1;
     this.valid = false;
 }
 public XmlNodeListEnumerator(XPathNodeList list)
 {
     this.list = list;
     this.index = -1;
     this.valid = false;
 }