关于RSS项目描述的图像 [英] Images On The Description Of An RSS Item

查看:125
本文介绍了关于RSS项目描述的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始使用RSS开发,我的新网站,但我想知道是否有任何方法可以将图像放在项目的描述上,如下所示:

I'm starting with RSS development, for my new site, but I want to know if there is any way to put images on the description of a item, something like this:

<item>
    <title>Image Test</title>         
    <link>http://testin.test</link>
    <description>Some text...
    <img src="image.jpg"></description>
</item>

如果有可能,哪些Feed阅读器能够清晰,完美地将其可视化。

And if it's possible, which feed readers will be able to visualize it clearly and perfect.

推荐答案

您可以在CDATA内部引用图像(通常已完成)。示例:

You can have a reference to an image inside CDATA (which is typically done). Example:

<item><title>June 13  : Cool Clear Waters</title>
<link>http://www.whitegrass.com/report.html</link>
<description>
<![CDATA[<img align="left" hspace="5" src="http://www.whitegrass.com/June 2011/IMGP9201LG.jpg"/>
 Work a little, play a little, dream into summer, celebrate a great winter gone by, keep movin'... <br />]]>
</description>
<guid isPermaLink="false">http://www.mcgurrin.com/whitegrass.xml</guid>
<pubDate>Tue, 14 Jun 2011 01:32:00 GMT</pubDate></item>

另一种方法是在机箱标签中允许一个参考(可能是图像) RSS 2.0(有关详细信息,请参阅规范,因为必须提供其他信息。更常见的是,这用于链接到播客的mp3。

An alternative is that one reference (which may be to an image) is allowed in the enclosure tag in RSS 2.0 (see the specification for details, as additional information must be provided. More typically this is used to link to the mp3 for podcasts.

这篇关于关于RSS项目描述的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆