Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8817645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:53:59+00:00 2026-06-14T04:53:59+00:00

In my application i will have dynamic rss feed url saved by users. so

  • 0

In my application i will have dynamic rss feed url saved by users. so i want to know that how can i read that xml which will be returned by rss feed. what will be the structure of that xml ? I have reviewed some feed url and i noticed that most of them have title and description tags but i am not sure to this. if i get these two tags then i will parse xml but if they are not always available then how can i parse xml in that case.

these two contains title and description tag

http://rss.news.yahoo.com/rss/entertainment
http://xml.weather.yahoo.com/forecastrss?p=USCA1116
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:54:00+00:00Added an answer on June 14, 2026 at 4:54 am

    At first you need to read a XML file for that I recommend you to use XPath or Linq to XML, and as you already said there are three main elements that make up a feed; “title”, “link” and “description”.

    Not a very long time ago I wrote a code to do that, I hope this works for you.

    I created this two entities.

        public class RssFeed
        {
            public string Title { get; set; }
    
            public string Link { get; set; }
    
            public string Description { get; set; }
    
            public string PubDate { get; set; }
    
            public string Language { get; set; }
    
            public ObservableCollection<RssItem> RssItems { get; set; }
        }
    
        public class RssItem
        {
            public string Title { get; set; }
    
            public string Description { get; set; }
    
            public string Link { get; set; }
        }
    

    Then on this method I read every element from the XML file by using Linq to XML

    private static void ReadFeeds()
            {
                string uri = @"http://news.yahoo.com/rss/entertainment";
    
                WebClient client = new WebClient();
                client.DownloadStringAsync(new Uri(uri, UriKind.Absolute));
    
                client.DownloadStringCompleted += (s, a) =>
                {
                    if (a.Error == null && !a.Cancelled)
                    {
                        var rssReader = XDocument.Parse(a.Result);
    
                        var feed = (from rssFeed in rssReader.Descendants("channel")
                                    select new RssFeed()
                                    {
                                        Title = null != rssFeed.Descendants("title").FirstOrDefault() ?
                                                rssFeed.Descendants("title").First().Value : string.Empty,
    
                                        Link = null != rssFeed.Descendants("link").FirstOrDefault() ?
                                                rssFeed.Descendants("link").First().Value : string.Empty,
    
                                        Description = null != rssFeed.Descendants("description").FirstOrDefault() ?
                                                rssFeed.Descendants("description").First().Value : string.Empty,
    
                                        PubDate = null != rssFeed.Descendants("pubDate").FirstOrDefault() ?
                                                rssFeed.Descendants("pubDate").First().Value : string.Empty,
    
                                        Language = null != rssFeed.Descendants("language").FirstOrDefault() ?
                                                rssFeed.Descendants("language").First().Value : string.Empty
                                    }).Single();
    
                        var rssFeeds = (from rssItems in rssReader.Descendants("item")
                                        select new RssItem()
                                        {
                                            Title = null != rssItems.Descendants("title").FirstOrDefault() ?
                                                     rssItems.Descendants("title").First().Value : string.Empty,
    
                                            Link = null != rssItems.Descendants("link").FirstOrDefault() ?
                                                     rssItems.Descendants("link").First().Value : string.Empty,
    
                                            Description = null != rssItems.Descendants("description").FirstOrDefault() ?
                                                     rssItems.Descendants("description").First().Value : string.Empty,
                                        }).ToList();
    
                        feed.RssItems = new ObservableCollection<RssItem>(rssFeeds);
                    }
                };
            }
    

    And finally you have your feed to be displayed wherever you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating an application that will have a list of items that can
I am creating a web application that will have many users. Each user has
I am currently developing a dynamic RSS feed that will automatically pull articles from
My application will have a per machine (not per user) Startup shortcut. I can
In my web application I will have users, each user will have albums, and
I am building an application that will have a model that belongs_to another model
I am writing a PHP application that will have the ability to edit settings
I'm building an application which will have dynamic allocated objects of type A each
We're developing an application that will have a plug-in architecture to allow consumers of
Background I'm working on a an educational JavaScript application/site (SPA) that will eventually have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.