Select nodes in RSS : RSS : XML C# Examples


C# Examples » XML » RSS »

 

Select nodes in RSS









    
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
» RSS