title: Best way to consume an RSS feed
body: <p>I'm currently working on an ASP.NET Website where I want to retrieve data from an RSS feed. I can easily retrieve the data I want and get it to show in i.e. a Repeater control.</p>
  
  <p>My problem is, that the blog (Wordpress) that I'm getting the RSS from uses <code>\n</code> for linebreaks which I obviously can't use in HTML. I need to replace these <code>\n</code> with a <code>&lt;br /&gt;</code> tag.</p>
  
  <p>What I've done so far is:</p>
  
  <pre><code>SyndicationFeed myFeed = SyndicationFeed.Load(XmlReader.Create("urltofeed/"));
  IEnumerable&lt;SyndicationItem&gt; items = myFeed.Items;
  foreach(SyndicationItem item in items)
  {
    Feed f = new Feed();
    f.Content = f.ConvertLineBreaks(item.Summary.Text);
    f.Title = item.Title.Text;
    feedList.Add(f);
  }
  rptEvents.DataSource = feedList;
  rptEvents.DataBind();
  </code></pre>
  
  <p>Then having a Feed class with two properties: Title and Content and a helper-method to replace <code>\n</code> with <code>&lt;br /&gt;</code></p>
  
  <p>However, I'm not sure if this is a good/pretty approach to get data from an RSS feed?</p>
  
  <p>Thanks in advance,</p>
  
  <p>Bo</p>