annotate tests/mr.ur @ 11:43c3fbd8527a

Add variant of children allowing specification of optional matches.
author Karn Kallio <kkallio@eka>
date Thu, 23 Jun 2011 23:40:29 -0430
parents a4e5d053daed
children 0140b1662994
rev   line source
adam@0 1 fun main () =
adam@8 2 doc <- Feed.fetch "http://marginalrevolution.com/feed";
adam@8 3
adam@1 4 Feed.app (Feed.children
adam@8 5 (Feed.tagA "item" ())
adam@8 6 (Feed.tagC "link", Feed.tagC "title", Feed.tagC "content:encoded"))
adam@8 7 (fn ((), (link, title, content)) =>
adam@8 8 debug ("URL: " ^ link);
adam@8 9 debug ("Title: " ^ title);
adam@8 10 debug ("Content: " ^ content))
adam@8 11 doc;
adam@0 12 return <xml>
adam@1 13 See stdout.
adam@0 14 </xml>