Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jeremyk
Visitor

Simple RSS parsing question

I am looping through an RSS feed using the following

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.
0 Kudos
1 REPLY 1
belltown
Roku Guru

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
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.