开发者

Safari RSS issue

I have a problem with my rss in Safari browser. I have a rss for my testimonials:

This is my codes:

<title>MySite</title> 
<link>http://mysite.com</link> 
<description></description> 
<language>en</langua开发者_如何学Cge><item> 

<title>Mary</title> 
<description></description> 
<link>http://mysite.com/testimonials/</link></item><item> 
<title>Chuck</title> 
<description></description> 
<link>http://mysite.com/testimonials/</link></item><item> 
<title>John</title> 
<description></description> 
<link>http://mysite.com/testimonials/</link></item> 

Their links is all the same.

I don't know why only "Mary" is shown in Safari the other two is not shown but they have all the same links. I want to show also "chuck" and "John" in the feeds.

Any help is appreciated.

Thanks in advance!


You need an xml tag and an rss tag for this to come close to being RSS.

To answer your question: Safari thinks all your items are the same because they have the same link. Add unique guid tags to each item.


your syntax is wrong. your feed thinks the body is all one item. you need to separate them. go here: http://www.make-rss-feeds.com/


As has been stated above the XML provided above is malformed. Aditionally the RSS view in safari will only display unique items. In the context of the Safari RSS view, an item is considered unique if it's <link> and <title> values are different to any other item in the channel.

Applying the ideas discussed above, your RSS feed will look something like this:

 <?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<language>en</language>
<channel>
 <item>
 <title>Mary</title> 
 <description></description> 
 <link>http://mysite.com/testimonials/</link></item><item>
 </item>
 <item>
 <title>Bob</title> 
 <description></description> 
 <link>http://mysite.com/testimonials/#a</link></item><item>
 </item>
 <item>
 <title>Mike</title> 
 <description></description> 
 <link>http://mysite.com/testimonials/#b</link></item><item>
 </item>
 </channel>
</rss>

Note that each individual item now appears in a seperate <item> node, this and a unique URL will cause the Safari RSS view to display each item title as a heading.

During the research for this answer I did experiment with the <guid> element to see if that would cause the same result without a modified URL but this appears not to work.

Note also that the example I've provided above is not RSS 2.0 compliant as it is missing some required elements as defined by the specification


You don't have any <item> elements. Use a validator!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜