Parse selected RSS feeds

Hi guys,

Im totally useless at coding, just trying to learn from examples on the internet,

def url = "http://www.reddit.com/r/todayilearned/.rss"
def rss = new XmlSlurper().parse(url)

output:
${(rss.channel.item.title)}

Right now it is outputting all the stories, how do I select the first story or how to select one story?

rss.channel.item.title.find{ it.toString().contains(“kangaroos”) }

try reading some groovy examples:
http://groovy.codehaus.org/JN1035-Maps

Hi Jason,

Thanks for your quick reply. But this function will just search by keyword, how do I select say only the second item.title?