Is this XML file correct for RSS feeding?
I am generating a XML-RSS type file from PHP.
The output for example is like this
<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
<title>Mi web mola</title>
<link>http://www.dominio.com/blog.php</link>
<language>es-ES</language>
<description>Mallas y eso</description>
<generator>Autor</generator>
<item>
<title>Articulo de prueba</title>
<link>http://www.midominio.com/2342</link>
<pubDate>14/06/2010</pubDate>
<description><![CDATA[Descripcion de prueba bla bla bla]]></description>
<content:encoded><![CDATA[Contenido prueba]]></content:encoded>
</item>
</channel>
</rss>
... and all I can see in the Firefox preview is the title and the description of the blog, not the items, but in the source it appears correctly, so I'开发者_运维技巧ve thought it must be a parse error or something like that..
What could be wrong?
Again, excuse me for my bad english, and thank you very much.
I don't know if this is your RSS problem, but as it stands that isn't valid XML-with-namespaces.
If you want to use a <content:encoded>
element, you should declare a namespace for the prefix content
.
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
Also pubDate
should be in RFC822 format, eg. Mon, 14 Jun 2010 12:00:00 GMT
.
精彩评论