Legal Information |
|
At first RSS was limited to the text format. What if I wanted to send some type of information that was not text? That is where the enclosure does its magic.Within enclosure you can place any audio, mpg, jpeg..whatever. What one can actually do in an RSS file is this. Take Janis Joplin and her album "Ball & Chain".
One critical caveat. Remember these are not text files and therefore they can get large. The larger they are the more the aggregator has to grab, the more bandwidth etc.
As a reminder, the enclosure command consists of three parts:
Lets see how this would be done, without too much coding. We will begin with the Item Element, so this is just a part of the RSS file. (I left out the guid here.)
<Item>
<title>Summertime by Janis Joplin</title>
<link>http://www.janisjoplin.com/songs/summertime.html</link>
<description> Summertime, And the livin' is easy Fish are jumpin' And the cotton is high Your daddy's rich And your
mamma's good lookin' So hush little baby Don't you cry One of these mornings You're going to rise up singing Then
you'll spread your wings And you'll take to the sky But till that morning There's a'nothing can harm you With daddy
and mamma standing by Summertime, And the livin' is easy Fish are jumpin' And the cotton is high Your daddy's rich
And your mamma's good lookin' So hush little baby Don't you cry</description>
<author>George Gershwin sung by Janis Joplin</author>
<category>Blues</category>
<category>Jazz</category>
<comments>http://www.janisjoplin.com/comments/summertime.html</comments>
<enclosure url="http://www.janisjoplin.com/mp3s/summertime.mp3" length="4368242" type="audio/mpeg"/>
<pubDate>Sat, 10 Dec 2005 23:00:00 GMT</pubDate>
</Item>
There you have it. An RSS PodCast. One item of the song Summertime. Of course your RSS will have every song on the album. Anyone who applies to the feed will be able to listen to all of Janis's songs in their RSS feed - Their Podcast. And you can do the same with a video, pictures etc.
Search Knowledge Base | Feedback |