Jump to content

Rss Feed Order


supertrucker

Recommended Posts

I'm trying to add an RSS feed engine to my site. I have the meat and potatoes portion completed, now I need the engine that syndicates them. Here's the example from the W3Schools site:

<?xml version="1.0" encoding="ISO-8859-1" ?><rss version="2.0"><channel>  <title>W3Schools Home Page</title>  <link>http://www.w3schools.com</link>  <description>Free web building tutorials</description>  <item>	<title>RSS Tutorial</title>	<link>http://www.w3schools.com/rss</link>	<description>New RSS tutorial on W3Schools</description>  </item>  <item>	<title>XML Tutorial</title>	<link>http://www.w3schools.com/xml</link>	<description>New XML tutorial on W3Schools</description>  </item></channel></rss>

My question is this: As you add new items to your RSS XML, do the new ones go at the beginning, or the end of it? Does it not matter? How many items should you have in your XML before you start removing them from the XML? Do you need to remove them from the XML, or should this thing just be allowed to grow as big as Jupiter? Should the XML show the MOST recent item only?I've been searching online for a good part of the afternoon and can't seem to find the answer, perhaps a bad choice of keywords :) . I appreciate any feedback, and yes, I'm aware this is not a PHP specific question, but the engine will be written in PHP and there isn't a forum here for RSS :)Edit:Ok, found this on a website:

In RSS 0.91, various elements are restricted to 500 or 100 characters. There can be no more than 15 <item>s in a 0.91 <channel>. There are no string-length or XML-level limits in RSS 0.92 and greater. Processors may impose their own limits, and generators may have preferences that say no more than a certain number of <item>s can appear in a channel, or that strings are limited in length.
I suppose this pretty much answers my questions, but I still wonder if there is an unspoken rule of no more than 15 items. I wouldn't want specific aggregators blocking my syndicate because I have more than 15 items. Also, do the new items go at the top or bottom of the XML? What do you think?Once again, to answer yet another of my own questions, the newer items go at the beginning of the example, here's a sample!
<?xml version="1.0"?><rss version="2.0">   <channel>	  <title>Liftoff News</title>	  <link>http://liftoff.msfc.nasa.gov/</link>	  <description>Liftoff to Space Exploration.</description>	  <language>en-us</language>	  <pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate>	  <lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate>	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>	  <generator>Weblog Editor 2.0</generator>	  <managingEditor>editor@example.com</managingEditor>	  <webMaster>webmaster@example.com</webMaster>	  <item>		 <title>Star City</title>		 <link>http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp</link>		 <description>How do Americans get ready to work with Russians aboard the International Space Station? They take a crash course in culture, language and protocol at Russia's <a href="http://howe.iki.rssi.ru/GCTC/gctc_e.htm">Star City</a>.</description>		 <pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>		 <guid>http://liftoff.msfc.nasa.gov/2003/06/03.html#item573</guid>	  </item>	  <item>		 <description>Sky watchers in Europe, Asia, and parts of Alaska and Canada will experience a <a href="http://science.nasa.gov/headlines/y2003/40may_solareclipse.htm">partial eclipse of the Sun</a> on Saturday, May 31st.</description>		 <pubDate>Fri, 30 May 2003 11:06:42 GMT</pubDate>		 <guid>http://liftoff.msfc.nasa.gov/2003/05/30.html#item572</guid>	  </item>	  <item>		 <title>The Engine That Does More</title>		 <link>http://liftoff.msfc.nasa.gov/news/2003/news-VASIMR.asp</link>		 <description>Before man travels to Mars, NASA hopes to design new engines that will let us fly through the Solar System more quickly.  The proposed VASIMR engine would do that.</description>		 <pubDate>Tue, 27 May 2003 08:37:32 GMT</pubDate>		 <guid>http://liftoff.msfc.nasa.gov/2003/05/27.html#item571</guid>	  </item>	  <item>		 <title>Astronauts' Dirty Laundry</title>		 <link>http://liftoff.msfc.nasa.gov/news/2003/news-laundry.asp</link>		 <description>Compared to earlier spacecraft, the International Space Station has many luxuries, but laundry facilities are not one of them.  Instead, astronauts have other options.</description>		 <pubDate>Tue, 20 May 2003 08:56:02 GMT</pubDate>		 <guid>http://liftoff.msfc.nasa.gov/2003/05/20.html#item570</guid>	  </item>   </channel></rss>

So one more question to go!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...