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

  • Home
  • SEARCH
  • 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 504535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:30:24+00:00 2026-05-13T06:30:24+00:00

I tried to use linq but failed because i have no xml knowledge. What

  • 0

I tried to use linq but failed because i have no xml knowledge.

What is the easiest way to get the id or link and updated from an rss feed? (an example feed -> https://stackoverflow.com/feeds/question/1926343)

I have no idea how to skip all elements until the first entry element. I also dont know how to pull each link and data from each elements from within the entry element

  • 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-05-13T06:30:25+00:00Added an answer on May 13, 2026 at 6:30 am

    Here’s a minimal example of how to do this:

    var url = "http://stackoverflow.com/feeds/question/1926343";
    var rss = new WebClient().DownloadString(url);
    var doc = XDocument.Parse(rss);
    var mgr = new XmlNamespaceManager(new NameTable());
    var ns = "http://www.w3.org/2005/Atom";
    mgr.AddNamespace("atom", ns);
    
    foreach (var entry in doc.XPathSelectElements("/atom:feed/atom:entry", mgr))
    {
        var id = entry.Element(XName.Get("id", ns)).Value;
        var link = entry.Element(XName.Get("link", ns)).Attribute("href").Value;
        var updated = entry.Element(XName.Get("updated", ns)).Value;
        Console.WriteLine(id);
        Console.WriteLine("\tLink: " + link);
        Console.WriteLine("\tUpdated: " + updated);
    }
    

    And here’s the output that it generates:

    http://stackoverflow.com/questions/1926343/alternative-to-thead-sleep-in-c
        Link: http://stackoverflow.com/questions/1926343/alternative-to-thead-sleep-in-c
        Updated: 2009-12-18T05:21:53Z
    http://stackoverflow.com/questions/1926343/alternative-to-thead-sleep-in-c/1926359#1926359
        Link: http://stackoverflow.com/questions/1926343/alternative-to-thead-sleep-in-c/1926359#1926359
        Updated: 2009-12-18T04:56:01Z
    http://stackoverflow.com/questions/1926343/alternative-to-thead-sleep-in-c/1926361#1926361
        Link: http://stackoverflow.com/questions/1926343/alternative-to-thead-sleep-in-c/1926361#1926361
        Updated: 2009-12-18T04:56:06Z
    http://stackoverflow.com/questions/1926343/alternative-to-thead-sleep-in-c/1926365#1926365
        Link: http://stackoverflow.com/questions/1926343/alternative-to-thead-sleep-in-c/1926365#1926365
        Updated: 2009-12-18T04:58:08Z
    http://stackoverflow.com/questions/1926343/alternative-to-thead-sleep-in-c/1926446#1926446
        Link: http://stackoverflow.com/questions/1926343/alternative-to-thead-sleep-in-c/1926446#1926446
        Updated: 2009-12-18T05:21:53Z
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.