tags:

views:

90

answers:

3
Q: 

RSS or XML

I need to get data from a web site written in PHP. My boss wants me to provide an RSS feed to get updated content.

The problem is that I need to provide several informations (at least a dozen different field). Is returning data as XML a better way than RSS?

+5  A: 

RSS is a form of XML.

If you find yourself outputting the same sorts of data as what is in the RSS specification, it definately doesn't hurt to output in the RSS spec. That way, you can syndicate your content.

Jeff Winkworth
A: 

RSS is an XML schema that's good for publishing articles, news, bulletins. RSS will be very consumable - every device and app, it seems, knows how to consume RSS.

A custom XML schema may fit you better based on your requirements for all the different fields. But you will not have a vast audience of ready consumers for that schema.

Some questions you might ask yourself:

  • who do I want to consume this information? A wide variety, basically "everybody"? Or is it going to be consumed by a limited audience, let's say 3 or 4 partner companies. IF the former, that tends to recommend RSS. If the latter, it is neutral.
  • what information do you really need to convey? Will it fit nicely in an RSS Schema? If not, that recommends a custom XML schema. If it does ffit in RSS, why not use it.

You have to weigh the importance of your answers to get to a conclusion.

Cheeso
+4  A: 

It's really going to depend on what the data is and how it's going to be consumed.

RSS is XML, but it's XML meant to syndicate data with a consistent format (there's a pretty good overview here: http://cyber.law.harvard.edu/rss/rss.html), and that allows feed readers and other consumers to know how to process and display them. So if your boss wants to look at this data in his or her feed reader of choice, then go for RSS.

If the data is more varied or arbitrary, and is going to be consumed by some sort of application or other processor on the other end, then XML is probably a better solution.

Gabriel Hurley
It's to get data that will be integrated in another web application. It would have to be parsed and sent to a database before being consumed. I think XML would be the best way to go? With RSS it would not be possible to receive that much data with it's format.
Sebastien Lachance
Yeah, it sounds like plain xml will work well for that.
Gabriel Hurley