tags:

views:

461

answers:

2

I'm looking for a simple line or two of code that will grab an rss feed like this php line: $feed = "URL" from within a scala object.

I'm using scala/lift with Netbeans or Eclipse if it's relevant

+2  A: 

The best client API I've used for RSS feed parsing is ROME. It's open source, quite easy to use, and as a Java library, it can be invoked from Scala. I don't know of a pure-Scala library that does this.

Rob H
Thanks I came across Rome, but I'm trying to avoid too many additional dependencies at the moment. Rome may be the best long term solution. I'm doing my best to make a lean and mean prototype.
Mark Essel
+5  A: 

The simplest you can do is smth like this, if you do not want to bother with exceptions or readability:

val rssFeed = XML.load( (new URL(feedUrl)).openConnection.getInputStream )
Alexander Azarov
cool, just noting imports:import scala.xml._import java.net._now for my first pattern matching scala function
Mark Essel
got some great info from here from Ted Neward:http://www.ibm.com/developerworks/java/library/j-scala06029.html
Mark Essel