
I know a few people have been waiting for this one, so hopefully Steve will leave me alone after this ;) Anyway, so far I've described to your the bare minimum you have to do in order to set up an XML file for podcasting. Now I'm going to show you how to set your podcast apart from the rest by using HTML in your XML file, so it looks much prettier and is more usable in podcatchers that can understand it, like Google Reader. I'm going to assume you have at least a bare-bones understanding of what HTML is, and how to program a simple web-page using it. If not, there's a half-decent tutorial
here, or search for
HTML Tutorial on
Google.
So why should we do this? Well, ultimately, it's up to you, of course, but putting HTML in your XML file will benefit your subscribers in a few ways:
- Most importantly, it will allow you to use line-breaks and paragraph breaks in HTML podcatchers. Without using this, your description will just be one large block of text. You can hit the enter key till you're blue in the face, and it might format correctly in iTunes, but nothing will change the way it looks in Google Reader.
- Instead of offering web addresses to relevant websites for that episode, you can offer them as proper hyperlinks. Your subscribers will thank you for this alone.
- Use pretty much anything you can do in HTML - tables, lists, images, backgrounds - make your XML mirror the style and layout of your website. About the only thing you can't do is to use JavaScript.
The only downsides are that it will take a bit more effort on your part to make sure everything works as it should, and that it will pretty much double the file size of your XML file. If you don't have many episodes in your podcast though, it's definitely worth doing.
Unfortunately, not all podcatchers understand HTML (including, unfortunately, iTunes - which is weird, as it uses HTML for the iTunes store. Bummer), which means we need to code our XML in such a way that people not using a HTML compatible podcatcher won't notice any difference to any other podcast out there. This took me a good few days of experimentation to work out an acceptable way of coding the XML to work in this way, and I've not seen any other podcast pull this off yet, so you're getting let in on an exclusive here.
First of all, you'll need to change the namespace tag at the top of your XML file. We're going to make it so it downloads definitions for not only the iTunes tags, but also for the HTML enclosure we'll be using. Right now, you're probably using this namespace tag:
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
We're going to replace it with this one:
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
If you don't understand what we just did - imagine until this point, we've been writing our XML file in French. Which is fine, because we told the computer where to find a French dictionary so it could understand what we wanted to do. Now we want to write part of the XML in German as well, so we need to tell it where to find a German dictionary also.
Now for each episode of the podcast, we're going to need 2 <description> tags: one containing just plain text, for iTunes compatible podcatchers, and the other containing HTML for the more advanced podcatchers. The reason we can't have everything in one <description> block: plain text podcatchers will just show the raw HTML code to your users, which just looks ugly. Here's what the code is going to look like for the description for one of the episodes:
<description>This week, Jim McJim explores the climes of Glasgow through the ages, from the abhorrent weather in the dark ages, through to today's less tolerable rainstorm.
You can get further information on Jim's travels at http://www.jim-mcjim.com/ or email him at jim@jim-mcjim.com</description>
<content:encoded><![CDATA[
<p><img src="http://farm1.static.flickr.com/29/38329648_f43ddc78e2_m.jpg" align="left">This week, Jim McJim explores the climes of Glasgow through the ages, from the abhorrent weather in the dark ages, through to today's less tolerable rainstorm.</p>
<p>You can get further information on Jim's travels at the <a href="http://www.jim-mcjim.com/">Jim McJim website</a> or email him at <a href="mailto:jim@jim-mcjim.com">jim@jim-mcjim.com</a></p>
]]></content:encoded>
You'll see that the two description blocks are essentially the same (you'd be a fool not to copy and paste ;) but the second one is instantly more accessible to your users - it includes a small thumbnail which sets the scene for the content of the podcast, and also the links to the website and email will actually go to those places when the user clicks them. Make sure you keep these surrounding tags exactly as you see them here:
<content:encoded><![CDATA[
HTML description goes here
]]></content:encoded>
The extra ![CDATA[ bit just makes sure that iTunes will not try and display this information.
And that's pretty much it! As I said before, you can pretty much use any of the tags you'd use to build a webpage, giving you an infinite number of possibilities for presenting your information to people subscribing to your podcast. If you put this to good use in your own podcast, drop me
an email and maybe I'll feature it on the site! Don't forget to put a little link here if you get this up and running!