Reputation: 7247
I have a requirement to consume only the latest two rss feeds (using .NET) to reduce latency in reading RSS. I found plenty of examples to consume RSS. However, I did not find any to limit the feeds being read. And, this is not for a windows forms application.
Upvotes: 2
Views: 281
Reputation: 8231
RSS feeds are really just web pages. You could check the HTTP Last-Modified headers on all your feeds' URLs, then download the most recently updated ones. Be aware, though, you could starve your less-frequently updated feeds in this manner, especially if you have two feeds that update frequently in your set.
Here's an article on the matter: HTTP Conditional Get for RSS Hackers.
Upvotes: 0
Reputation: 19976
Open the http connection to the RSS URL and load the stream by hand, reading it entry by entry at a time, and then, when you had enough, terminate connection. You don't have to go all the way for whole XML.
Of course, some light XML parsing would be needed here.
Upvotes: 1