RSS - Element
Each - The element defines an article or "story" in an RSS feed.
- Element
Look at the following RSS document:
Runoob Tutorial首页
http://www.runoob.com
免费编程教程
-
RSS 教程
http://www.runoob.com/rss
Runoob Tutorial Rss 教程
As mentioned earlier, each - element defines an article or "story" in an RSS feed.
- element has three required child elements:
-
- Defines the title of the item. (e.g. RSS Tutorial)
-
- defines the hyperlink to the item. (e.g. http://www.runoob.com/rss)
- - describes the item (e.g. Runoob Tutorial Rss tutorial)
In addition, there are several - optional child elements, we will introduce the most important ones below.
Element
A child element used to specify the email address of an item's author.
Note: To prevent spam, some developers do not use this
.
The author of the item in the RSS document above might be:
admin@runoob.com
Element
The child element allows an item to be linked to comments about that item.
The comments of the item in the RSS document above might look like this:
http://www.runoob.com/comments
Element
The child element allows a media file to be included in an item.
element has three required attributes:
- url - defines the URL pointing to this media file
- length - defines the length of this media file (in bytes)
- type - defines the type of the media file
In the RSS document above, the media file included in the item might look like this:
RSS - Reference manual
| Element |
Description |
|
Optional. Specifies the email address of the item's author. |
|
Optional. Defines one or more categories to which the item belongs. |
|
Optional. Allows the item to link to comments (a file) about this item. |
|
Required. Describes the item. |
|
Optional. Allows a media file to be included in an item. |
|
Optional. Defines a unique identifier for the item. |
|
|
Required. Defines the hyperlink to this item. |
|
Optional. Defines the last publication date of this item. |
|
Optional. Specifies a third-party source for this item. |
|
|
Required. Defines the title of this item. |