How to get Feed from url in C#.

Below function will used to get feed item from URL.

        public static string GetRssFeedInList(string url, int howMany)
            // Get the rss feed
            var x = ReturnXmlFromUrl(url);

            // Create a string builder for the feed
            var sb = new StringBuilder();

            // Try and get the movie
            var nodes = x.GetElementsByTagName("item");
            var i = 0;
            foreach (XmlNode node in nodes)
                if (i &lt;= (howMany - 1))
                    if (node != null)
                        sb.Append(String.Format("<a target='_blank' href='{0}'>{1}</a>", node["link"].InnerText,    node["title"].InnerText));
            return sb.ToString().Trim();

Page Keyword: How to Get a Feed from URL in .Net. Really Simple Syndication (RSS) feed from Url,
Get feed content from code in c#, get feed content in .net, Return rss feed item from url. Creating RSS Feed, c# Code for RSS Feed. Live Feed Item from URL. How to get Rss or ATOM feed from URL in c#, In .Net.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s