tags:

views:

57

answers:

5

Is RSS usually generated when you add new article/blog/information? I mean do you usually generate it when adding operation is successful?

I have built property website for client and they are using remote web app with property management from different company which feeds our website with clients properties using XML feeds.

How do I generate feeds in this case? We read data directly from their XML source so I dont know when client adds new property and therefore when RSS should update.

Should I do this periodically and how can I do that in .net?

Thanks.

+2  A: 

Feeds are generally generated when requested, think of them just like any other webpage. Since you have mention .NET I assume you are using WebForms? If so have a look at the sample below it will explain how to generate the feed from a SQL Database but you can replace the datasource with your provider.

http://www.codedigest.com/Articles/ASPNET/86_Generate_RSS_Feed_in_ASPNet.aspx

http://www.geekpedia.com/tutorial157_Create-an-RSS-feed-using-ASP.NET-2.0.html

http://www.uberasp.net/getarticle.aspx?id=17

Pino
+2  A: 

An RSS feed is generated when someone requests it and not when something is added/modified. In .NET there are many ways to generate an RSS feed, one of them is to use WCF.

Darin Dimitrov
A: 

Rather than pre generating the feed, why don't you have a dynamic feed url, which will pic your data from data source, structure the data to RSS format and then publish on request. so each time a user requests feeds they get very latest updates

for more info read here how to create rss feeds: http://www.petefreitag.com/item/465.cfm

Aneef
+1  A: 

RSS Feeds have a pubDate element using which you can detect whether new entries are added to it. Some rmoe information here.

In .net you can use System.ServiceModel.Syndication namespace to parse RSS feeds.

Shoban
+2  A: 

Personally I'd regenerate the feed as you suggest; when a new article/blog post/information is added to your data store (which you're generating by reading external xml feeds if I read your question correctly?). You could then cache the result to avoid unnecessarily regenerating data. NB: It's only worth doing this if you read from the rss feed more frequently than you regenerate the information.

I'm sure there's plenty of ways to generate an rss feed in .net.

If you want to pull in their xml feeds and only update when that information has changed, you could periodically poll their xml feeds and compare against the previous result. If the information has changed (different content length or your could look at the last entry if they're date-sorted) just run your rss generation code for the additional items.

Jon Cage