RSS <enclosure>Element
Complete RSS Reference Manual
Definition and Usage
The <enclosure> element allows media files to be included in an item.
Attributes
| Attributes | Description |
|---|---|
| length | Required. Defines the length of the media file (in bytes). |
| type | Required. Defines the type of the media file. |
| url | Required. Defines the URL pointing to the media file. |
Example
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>Example Homepage</title>
<link>http://www.example.com</link>
<description>Free Programming Tutorials</description>
<item>
<title>RSS Tutorial</title>
<link>http://www.example.com/rss</link>
<description>Example RSS Tutorial</description>
<enclosure url="http://www.example.com.cc/try/demo_source/movie.mp4"
length="78645" type="video/mp4" />
</item>
</channel>
</rss>
Try it Yourself »
Complete RSS Reference Manual Other Extensions