FREE Web Template Download
HTML CSS JAVASCRIPT SQL PHP BOOTSTRAP JQUERY ANGULARJS TUTORIALS REFERENCES EXAMPLES Blog
 

RSS <enclosure> Element


RSS Reference Complete RSS Reference

Definition and Usage

The <enclosure> element allows a media-file to be included with an item.


Attributes

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

Example

<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">

<channel>
  <title>subhodaya Home Page</title>
  <link>http://tutorials</link>
  <description>Free web building tutorials</description>
  <item>
    <title>RSS Tutorial</title>
    <link>http://tutorials/xml/xml-rss.asp</link>
    <description>New RSS tutorial on subhodaya</description>
    <enclosure url="http://tutorials/media/3d.wmv"
    length="78645" type="video/wmv" />

  </item>
</channel>

</rss>

Try it Yourself »

RSS Reference Complete RSS Reference