view tests/mr.ur @ 9:f19beef42ceb

Add tag combinator with given attribute values.
author Karn Kallio <kkallio@eka>
date Tue, 31 May 2011 09:21:49 -0430
parents a4e5d053daed
children 0140b1662994
line wrap: on
line source
fun main () =
    doc <- Feed.fetch "http://marginalrevolution.com/feed";

    Feed.app (Feed.children
                  (Feed.tagA "item" ())
                  (Feed.tagC "link", Feed.tagC "title", Feed.tagC "content:encoded"))
             (fn ((), (link, title, content)) =>
                 debug ("URL: " ^ link);
                 debug ("Title: " ^ title);
                 debug ("Content: " ^ content))
             doc;
    return <xml>
      See stdout.
    </xml>