jeremyk
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2012
08:43 AM
Simple RSS parsing question
I am looping through an RSS feed using the following
The problem I have is that my media:thumbnail is nested under media:content so returns as null when I am walking through the tree looking for it. I was wondering if anyone knows how I can get into media:content and get to the thumbnail?
Thanks very much for the help.
for each item in xml.channel.item
'Gets the tile
tmp = item.GetNamedElements("media:title")
'Fails to get thumbnail because the thumbnail is actually in xml.channel.item.media:content
tmp = item.GetNamedElements("media:thumbnail")
next
The problem I have is that my media:thumbnail is nested under media:content so returns as null when I am walking through the tree looking for it. I was wondering if anyone knows how I can get into media:content and get to the thumbnail?
Thanks very much for the help.
1 REPLY 1
belltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2012
05:33 PM
Re: Simple RSS parsing question
Try this:
for each item in xml.channel.item
'Gets the tile
tmp = item.GetNamedElements("media:title")
mediaContentList = item.GetNamedElements ("media:content")
tmp = mediaContentList [0].GetNamedElements("media:thumbnail")
next