W3Schools

home HOME

RSS Basic
RSS Home
RSS Introduction
RSS History
RSS Syntax
RSS <channel>
RSS <item>
RSS Publish Feed
RSS Read a Feed

References
RSS Reference

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

W3Schools Forum

Helping W3Schools

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="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>
    <enclosure url="http://www.w3schools.com/media/3d.wmv"
    length="78645" type="video/wmv" />
  </item>
</channel>
</rss>


Try-It-Yourself Demos

The <enclosure> element
How to use the <enclosure> element.


RSS Reference Complete RSS Reference




Jump to: Top of Page or HOME or Printer Friendly Printer friendly page

W3Schools provides material for training only. We do not warrant the correctness of its contents. The risk from using it lies entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.

Copyright 1999-2008 by Refsnes Data. All Rights Reserved.

Validate Validate W3C-WAI level A conformance icon W3Schools was converted to XHTML in December 1999