Domanda

I'm trying to create some valid RSS 2.0 data and I can't get the "atom:link" to validate.

Is it because I havent done the page yet, or is it because I have some invalid format?

<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<atom:link href="http://www.lasseedsvik.se/rss" rel="self" type="application/rss+xml" />
<title>Test Test</title>
<link>http://www.lasseedsvik.se/rss</link>
<description>test</description>
<language>sv-se</language>
<item>
<title>test</title>
<link>
http://www.lasseedsvik.se/123
</link>
<guid>
http://www.lasseedsvik.se/123
</guid>
<description>
<![CDATA[test]]>
</description>
</item>
</channel>
</rss>
È stato utile?

Soluzione

A link to the validator error page would be useful to help you debug this.

But I think you may need to put the version before the nanemspace declaration, like so:

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

The validator may also want to see an XML prolog. Maybe you have one and just did not include it in your example.

Note that no validator is perfect. The one at feedvalidator.org, for example, carps about perfectly valid feeds that don't implement "best practices" defined by the validator's creators. So, the most important thing is to make sure your feed is valid XML, then make sure it complies with the RSS 2.0 spec.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top