• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • C#高級編程:使用XPath命名空間中的類[1]

    發表于:2008-05-15來源:作者:點擊數: 標簽:XPath空間高級
    關鍵字: .net 要理解這些類的用法,最好是查看一下迭代books.xml文檔的代碼,確定導航是如何工作的。為了使用這些示例,首先需要添加對System.Xml.Xsl 和 System.Xml. XP ath命名空間的引用,如下所示: using System.Xml.XPath; using System.Xml.Xsl; 這個
    關鍵字:.net

        要理解這些類的用法,最好是查看一下迭代books.xml文檔的代碼,確定導航是如何工作的。為了使用這些示例,首先需要添加對System.Xml.Xsl 和 System.Xml.XPath命名空間的引用,如下所示:
        using System.Xml.XPath;
        using System.Xml.Xsl;

        這個示例使用了文件booksxpath.xml,它類似于前面使用的books.xml,但booksxpath.xml添加了兩本書。下面是窗體代碼,這段代碼在XPathXSLSample1文件夾中:
        private void button1_Click(object sender, System.EventArgs e)
        {
           //modify to match your path structure
           XPathDocument doc=new XPathDocument("..\\..\\..\\booksxpath.xml");
           //create the XPath navigator
           XPathNavigator nav=doc.CreateNavigator();
           //create the XPathNodeIterator of book nodes
           // that have genre attribute value of novel
           XPathNodeIterator iter=nav.Select("/bookstore/book[@genre='novel']"); 
         

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>