-
-
Save ppazos/bb58e715498ae31d278555af16311aed to your computer and use it in GitHub Desktop.
Parsing rss in groovy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// define the url | |
def url = "http://news.google.com/news?ned=us&topic=h&output=rss" | |
def rss = new XmlSlurper().parse(url) | |
println rss.channel.title | |
rss.channel.item.each { | |
println "- ${it.title}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment