<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Consume a WordPress RSS Feed in C# and cache it.</title>
	<atom:link href="http://andrewblogs.com/blog/consume-wordpress-rss-feed-in-c-sharp-and-cache-it/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewblogs.com/blog/consume-wordpress-rss-feed-in-c-sharp-and-cache-it/</link>
	<description></description>
	<lastBuildDate>Thu, 22 Dec 2011 07:12:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jason M</title>
		<link>http://andrewblogs.com/blog/consume-wordpress-rss-feed-in-c-sharp-and-cache-it/comment-page-1/#comment-5815</link>
		<dc:creator>Jason M</dc:creator>
		<pubDate>Mon, 21 Nov 2011 22:11:01 +0000</pubDate>
		<guid isPermaLink="false">http://cowfarm.net/?p=396#comment-5815</guid>
		<description>Here is a function to get the 5 fields of the feed:


static IList GetBlogFeed(string feedUrl, int feedCount)
{
  XNamespace content = XNamespace.Get(&quot;http://purl.org/rss/1.0/modules/content/&quot;);

  var doc = XDocument.Load(feedUrl);
  var feeds = doc.Descendants(&quot;item&quot;).Select(x =&gt;
    new FeedViewModel
    {
      Title = x.Element(&quot;title&quot;).Value,
      PublishedDate = DateTime.Parse(x.Element(&quot;pubDate&quot;).Value),
      Url = x.Element(&quot;link&quot;).Value,
      Description = x.Element(&quot;description&quot;).Value,
      Content = x.Element(content + &quot;encoded&quot;).Value
    }).OrderByDescending(x =&gt; x.PublishedDate).Take(feedCount);
  return feeds.ToList();
}</description>
		<content:encoded><![CDATA[<p>Here is a function to get the 5 fields of the feed:</p>
<p>static IList GetBlogFeed(string feedUrl, int feedCount)<br />
{<br />
  XNamespace content = XNamespace.Get(&#8220;http://purl.org/rss/1.0/modules/content/&#8221;);</p>
<p>  var doc = XDocument.Load(feedUrl);<br />
  var feeds = doc.Descendants(&#8220;item&#8221;).Select(x =&gt;<br />
    new FeedViewModel<br />
    {<br />
      Title = x.Element(&#8220;title&#8221;).Value,<br />
      PublishedDate = DateTime.Parse(x.Element(&#8220;pubDate&#8221;).Value),<br />
      Url = x.Element(&#8220;link&#8221;).Value,<br />
      Description = x.Element(&#8220;description&#8221;).Value,<br />
      Content = x.Element(content + &#8220;encoded&#8221;).Value<br />
    }).OrderByDescending(x =&gt; x.PublishedDate).Take(feedCount);<br />
  return feeds.ToList();<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason M</title>
		<link>http://andrewblogs.com/blog/consume-wordpress-rss-feed-in-c-sharp-and-cache-it/comment-page-1/#comment-5814</link>
		<dc:creator>Jason M</dc:creator>
		<pubDate>Mon, 21 Nov 2011 22:09:53 +0000</pubDate>
		<guid isPermaLink="false">http://cowfarm.net/?p=396#comment-5814</guid>
		<description>This is great, but you should point out there is a &quot;trick&quot; to getting the content:encoded.

// Declare this
XNamespace content = XNamespace.Get(&quot;http://purl.org/rss/1.0/modules/content/&quot;);

// Then later:
Content = x.Element(content + &quot;encoded&quot;).Value</description>
		<content:encoded><![CDATA[<p>This is great, but you should point out there is a &#8220;trick&#8221; to getting the content:encoded.</p>
<p>// Declare this<br />
XNamespace content = XNamespace.Get(&#8220;http://purl.org/rss/1.0/modules/content/&#8221;);</p>
<p>// Then later:<br />
Content = x.Element(content + &#8220;encoded&#8221;).Value</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tky</title>
		<link>http://andrewblogs.com/blog/consume-wordpress-rss-feed-in-c-sharp-and-cache-it/comment-page-1/#comment-3326</link>
		<dc:creator>tky</dc:creator>
		<pubDate>Fri, 06 May 2011 08:21:52 +0000</pubDate>
		<guid isPermaLink="false">http://cowfarm.net/?p=396#comment-3326</guid>
		<description>thanks for your sharing, i&#039;m art designer, i still don&#039;t know how to use it, is there any example or demo here? thank you.</description>
		<content:encoded><![CDATA[<p>thanks for your sharing, i&#8217;m art designer, i still don&#8217;t know how to use it, is there any example or demo here? thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Moises Myrum</title>
		<link>http://andrewblogs.com/blog/consume-wordpress-rss-feed-in-c-sharp-and-cache-it/comment-page-1/#comment-909</link>
		<dc:creator>Moises Myrum</dc:creator>
		<pubDate>Fri, 03 Sep 2010 12:17:34 +0000</pubDate>
		<guid isPermaLink="false">http://cowfarm.net/?p=396#comment-909</guid>
		<description>Thanks alot this was helpful. I really love your site, the design is very cool. I have came here a few times but  have never left a commented, just wanted to let you know...</description>
		<content:encoded><![CDATA[<p>Thanks alot this was helpful. I really love your site, the design is very cool. I have came here a few times but  have never left a commented, just wanted to let you know&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

