title: How to order an RSS Feed from a News Site by the Publication Date
body: <p>I am using .net 4 and reading a RSS feed from a News website - <a href="http://feeds.bbci.co.uk/news/uk/rss.xml?edition=uk" rel="nofollow">http://feeds.bbci.co.uk/news/uk/rss.xml?edition=uk</a></p>
  
  <p>I have got the feed coming into the page using a repeater but I have just noticed that the feeds are not sorting Publication Date DESC all the time. There seems to be a strange grouping. </p>
  
  <p>How am I able to explicitly specify that it is sorted by Publication Date DESC? </p>
  
  <p>This is what I have so far...</p>
  
  <pre><code>private void PopulateRssFeed()
  {
      //BBC UK 
      string RssFeedUrl = "http://feeds.bbci.co.uk/news/uk/rss.xml?edition=uk";
  
      List&lt;Feeds&gt; feeds = new List&lt;Feeds&gt;();
      try
      {
          XDocument xDoc = new XDocument();
          xDoc = XDocument.Load(RssFeedUrl);
  
          //Take 3 Limits the number of items to display
          //i.e -
          //var items = (from x in xDoc.Descendants("item").Take(3)
          var items = (from x in xDoc.Descendants("item")
                       select new
                       {
                           title = x.Element("title").Value,
                           link = x.Element("link").Value,
                           pubDate = x.Element("pubDate").Value,
                           description = x.Element("description").Value
                       });
  
  
          if (items != null)
          {
              foreach (var i in items)
              {
  
                  Feeds f = new Feeds
                  {
                      Title = i.title,
                      Link = i.link,
                      PublishDate = i.pubDate,
                      Description = i.description
                  };
  
                  feeds.Add(f);
  
              }
  
          }
  
          Repeater1.DataSource = feeds;
          Repeater1.DataBind();
  
      }
      catch (Exception ex)
      {
          throw ex;
      }
  }
  </code></pre>