RSS <item> element
Each <item> element defines an article or "story" in the RSS feed.
<item> Element
Please see the following RSS document:
<?xml version="1.0" encoding= "ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>W3Schools Home Page</title>
<link>http://www.w3schools.com</link>
<description>Free web building tutorials</description>
<item>
<title>RSS Tutorial</title>
<link>http://www.w3schools.com/rss</link>
<description>New RSS tutorial on W3Schools</description>
</item>
</channel>
</rss>
<rss version="2.0">
<channel>
<title>W3Schools Home Page</title>
<link>http://www.w3schools.com</link>
<description>Free web building tutorials</description>
<item>
<title>RSS Tutorial</title>
<link>http://www.w3schools.com/rss</link>
<description>New RSS tutorial on W3Schools</description>
</item>
</channel>
</rss>
As mentioned earlier, each <item> element defines an RSS feed An article or story in ". The
<item> element has three required child elements:
<title> - Defines the title of the item. (For example, RSS tutorial)
<link> - Define the hyperlink to the item (for example, http://www.w3cschool.cc/rss)
#. - ##<description> - Describe this item (such as w3school's RSS tutorial)
<author> element <author> sub-element is used to specify the email address of the author of a project
.
Note: To prevent spam, some developers will not use the <author> element The author of the item in the above RSS document may be:<. ;author>hege@refsnesdata.no</author>
##<comments> Element
<comments> child elements allow linking an item to Comments about this item.
Comments for the item in the RSS document above may look like this:
##<comments>http://www.w3schools.com/comments</ comments>
<enclosure> Element The
<enclosure> child element allows importing a media file into an item. The
<enclosure> 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
<enclosure url="http://www.w3schools.com/rss/rss.mp3"
length=" 5000" type="audio/mpeg" />
RSS <item> Reference Manual
Description | |
---|---|
Optional. Specifies the email address of the project author. | |
Optional. Define one or more categories to which the item belongs. | |
Optional. Allows projects to connect to comments (files) about this project. | |
Required. Describe this project. | |
Optional. Allows importing a media file into an item. | |
Optional. Define a unique identifier for the project. | |
Required. Defines a hyperlink to this item. | |
Optional. Defines the last release date for this project. | |
Optional. Designate a third-party source for this project. | |
Required. Defines the title of this project. |