Select nodes from XmlDocument : Xml Node : XML C# Examples


C# Examples » XML » Xml Node »

 

Select nodes from XmlDocument









    
using  System;
using  System.Collections.Generic;
using  System.Text;
using  System.Xml;
using  System.Net;

class  MainClass
{
        static  void  Main(string[]  args)
        {
                WebClient  client  =  new  WebClient();
                string  rssFeed  =  client.DownloadString("http://blogs.apress.com/wp-rss2.php");

                XmlDocument  doc  =  new  XmlDocument();
                doc.LoadXml(rssFeed);

                XmlNodeList  nodes  =  doc.SelectNodes("rss/channel/item/title");
                foreach  (XmlNode  node  in  nodes)
                {
                        Console.WriteLine(node.InnerText);
                }
        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo XML
» Xml Node