Solved

RSS feed reading

Posted on 2012-03-20
1
402 Views
Last Modified: 2012-06-27
My application reads a rss feed that contains posts by categories, and i have those categories pragmatically inserted in the code. What i want to know is how to read a rss feed and generate the categories for the tableview dynamically.

Best Regards.
0
Comment
Question by:BrunoSurprise
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
Lalit Chandra earned 500 total points
ID: 37744820
create a class

public class RSSItem
{
    public string title {get;set;}
    public string link  {get;set;}
    public string description  {get;set;}
 }

 then use linq to get a collection of RSSItem

public List<RSSItem> items;
 XElement rssFeed = XElement.Load(url).Element("channel");
 items = (from Item in rssFeed.Elements("item")
                 select new RSSItem()
                 {
                     title = Item.Element("title").Value,
                     description = Item.Element("description").Value,
                     link = Item.Element("link").Value
                 }).ToList<RSSItem>();


Now,you can iterate over the collection  rssFeed using ForEach ,and get your desire format.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
iPhone Ringtone  - How to shut off Sounds and Vibrations but not notifications 3 76
Open Office 365 shared calendar on iPhone 2 684
iCloud photo stream 4 52
Google Maps 6 43
     Intro      In this article, I will show you how to parse a JSON in Swift using an open source library called SwiftyJSON (https://github.com/SwiftyJSON/SwiftyJSON). If you haven't heard of a JSON before, it stands for JavaScript Object Notation…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question