dave
1
Hey all,
I’d like to include the iTunes XML data into my RSS feed, generated with
the code below:
xml.rss ‘version’ => ‘2.0’, ‘xmlns:itunes’ =>
‘Connecting to the iTunes Store.’ do
xml.channel do
xml.title ‘Title here’
xml.author ‘Everyone’
xml.description ‘Description here’
xml.link(@base_url + url_for(:controller => ‘/programs’))
xml.language ‘en-us’
… However, the iTunes XML tags aren’t a single word (e.g.,
“description”). Instead, they’re tags with subtags, like the output
here:
<itunes:image
href=“http://example.com/podcasts/everything/AllAboutEverything.jpg” />
itunes:authorauthor</itunes:author>
How could I generate this within the Ruby code? My attempts so far have
failed… :-!
Thanks!
dave
2
On Jun 7, 2006, at 9:15 PM, Dave wrote:
xml.author 'Everyone'
AllAboutEverything.jpg" />
itunes:authorauthor</itunes:author>
How could I generate this within the Ruby code? My attempts so far
have
failed… :-!
Try taking a look at the ‘plist’ gem [1]. The Apple xml format is a
bit different and needs to be handled as a special case.
cr
[1] http://raa.ruby-lang.org/project/plist/ (or do “gem install
plist” if you have rubygems installed)
dave
3
[email protected] wrote:
xml.channel do
<itunes:image
cr
[1] http://raa.ruby-lang.org/project/plist/ (or do “gem install plist”
if you have rubygems installed)
I think he means iTunes podcasting:
Search this page for ‘namespace’:
http://api.rubyonrails.org/classes/Builder/XmlMarkup.html
I think the syntax in this case would be:
xml.itunes(:description, ‘Description here’)
-Ross