Is there any scala library that can be used to generate RSS Feeds using idiomatic features like case classes? Even better if it provides helpers for using with Play framework.
Asked
Active
Viewed 1,589 times
13
-
2For JAva, take a look at Rome: http://rometools.org/ – ndeverge Aug 31 '12 at 17:51
-
If you look for java, duplicate: http://stackoverflow.com/questions/113063/java-rss-library – santiagobasulto Aug 31 '12 at 18:04
1 Answers
11
Well, the embedded XML DSL is an idiomatic (if somewhat lambasted) feature, so I don't see why you'd need any library support. Just take a bit of RSS XML, which is valid Scala, and put in some variable content:
val myRss =
<rss version="2.0">
<channel>
<title>An example RSS feed</title>
<description>La dee daah</description>
<link>http://www.example.com/rss</link>
<lastBuildDate>Mon, 05 Oct 2012 11:12:55 =0100 </lastBuildDate>
<pubDate>Tue, 06 Oct 2012 09:00:00 +0100</pubDate>
{
for (itemTitle <- List("foo", "bar", "baz")) yield {
<item>
<title>{itemTitle}</title>
<description>This is an example of an Item</description>
<link>http://www.example.com/item</link>
<guid isPermaLink="false">123</guid>
<pubDate>Tue, 06 Oct 2012 13:00:00 +0100</pubDate>
</item>
}
}
</channel>
</rss>

Erik Post
- 826
- 7
- 12