Mercurial > feed
view tests/mr.ur @ 23:e1e451cf85bb
Simplify Reddit example more
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 29 Sep 2012 10:34:11 -0400 |
parents | 0140b1662994 |
children |
line wrap: on
line source
fun main () = doc <- Feed.fetch "http://feeds.feedburner.com/marginalrevolution/feed"; Feed.app (Feed.children (Feed.tagA "item" ()) (Feed.tagC "link", Feed.tagC "title", Feed.tagC "content:encoded")) (fn ((), (link, title, content)) => error <xml/>; debug ("URL: " ^ link); debug ("Title: " ^ title); debug ("Content: " ^ content)) doc; return <xml> See stdout. </xml>