Click to See Complete Forum and Search --> : my xml file won't validate as an RSS feed


Megatron
04-06-2006, 06:06 AM
hi guys, i have a php script which generates an xml file. The xml file seems to be working properly as it validates in the browser. This is the link to the file:
http://www.pixelscience.it/rss.xml

and this is a snippet of the file:

<feeds>
<item>
<title>This</title>
<content>This</content>
<message>This</message>
</item>
</feeds>

I am using Magpie RSS to generate some Javascript for the RSS feed. When i do this i get:


# «details»
# «details»
# «details»
# «details»


instead of my desired feed. Does anyone know why this would be happening?

A_Richard_Watso
04-07-2006, 12:18 PM
There is a difference between valid XML and a valid RSS feed. Your file is valid XML, but does not appear to be valid RSS. The first thing that comes to mind is that <feeds> is not a recognized RSS tag. You can use this link to test your RSS feeds:
http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.pixelscience.it%2Frss.xml

~aw

chazzy
04-08-2006, 08:20 AM
This is the structure i've been using for RSS for a while...at least 1.5 years.


<?xml version='1.0' encoding='ISO-8859-1'?>
<rss version='2.0'>
<channel>
<lastBuildDate><!--this one's optional, a date/time--></lastBuildDate>
<title><!--Feed title--></title>
<description><!--Feed description--></description>
<link><!--url to somewhere - preferrably your homepage--></link>
<item>
<title><!--item title--></title>
<link><!--Item link--></link>
<!--I also belive you can a description element here..-->
</item>
<!-- then more items...-->
</channel>
</rss>

Megatron
04-08-2006, 12:59 PM
cheers guys, i never realised that there was a difference between valid XML and valid RSS. Makes sense when i think about it now.