RSS <enclosure> Element

Definition and Usage

The <enclosure> element allows you to include media files in a project.

Attribute

Attribute Description
length Mandatory. Defines the length of the media file (in bytes).
type Mandatory. Defines the type of the media file.
url Mandatory. Defines the URL pointing to the media file.

Examples

<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
  <title>CodeW3C.com Home Page</title>
  <link>http://www.codew3c.com</link>
  <description>Free web building tutorials</description>
  <item>
    <title>RSS Tutorial</title>
    <link>http://www.codew3c.com/rss</link>
    <description>New RSS tutorial on CodeW3C.com</description>
    <enclosure url="http://www.codew3c.com/media/movie.wmv"
    length="856329" type="video/wmv" />
  </item>
</channel>
</rss>