Select nodes in RSS : RSS « XML « C# / CSharp Tutorial






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);
        }
    }
}








30.31.RSS
30.31.1.Process RSS
30.31.2.Select nodes in RSS