Skip to content

Instantly share code, notes, and snippets.

@kdabir
Created February 22, 2012 12:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kdabir/1885022 to your computer and use it in GitHub Desktop.
Save kdabir/1885022 to your computer and use it in GitHub Desktop.
Parsing rss in groovy
// 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}"
}
@ppazos
Copy link

ppazos commented Mar 31, 2024

only open and read from an URL directly if you trust that URL!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment