开发者

Syndication format for describing threaded comments?

How to describe comments 开发者_JAVA百科tree with Atom/RSS?


There's a draft standard to extend Atom with threaded discussions, but that's no longer active. This is a feed with comments:

<feed xmlns="http://www.w3.org/2005/Atom"
       xmlns:thr="http://purl.org/syndication/thread/1.0">
   <id>http://www.example.org/myfeed</id>
   <title>My Example Feed</title>
   <updated>2005-07-28T12:00:00Z</updated>
   <link href="http://www.example.org/myfeed" />
   <author><name>James</name></author>
   <entry>
     <id>tag:example.org,2005:1</id>
     <title>My original entry</title>
     <updated>2006-03-01T12:12:12Z</updated>
     <link
       type="application/xhtml+xml"
       href="http://www.example.org/entries/1" />
     <summary>This is my original entry</summary>
   </entry>
   <entry>
     <id>tag:example.org,2005:1,1</id>
     <title>A response to the original</title>
     <updated>2006-03-01T12:12:12Z</updated>
     <link href="http://www.example.org/entries/1/1" />
     <thr:in-reply-to
       ref="tag:example.org,2005:1"
       type="application/xhtml+xml"
       href="http://www.example.org/entries/1"/>
     <summary>This is a response to the original entry</summary>
   </entry>
</feed>


You can use html in RSS but < and > must be present as &lt; and &gt;

<description>
...
&lt;!-- comments --&gt;
&lt;ul&gt;
  &lt;li&gt;comment1&lt;/li&gt;
  &lt;li&gt;comment2&lt;/li&gt;
  &lt;li&gt;comment3&lt;/li&gt;
  &lt;li&gt;comment4&lt;/li&gt;
&lt;ul&gt;
</description>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜