view tests/mr.ur @ 3:ea0ca570c121

Shortcut tag combinators
author Adam Chlipala <adam@chlipala.net>
date Tue, 11 Jan 2011 14:19:51 -0500
parents 8de269c09617
children a4e5d053daed
line wrap: on
line source
fun main () =
    Feed.app (Feed.children
                  (Feed.tagA "item" {1 = "rdf:about"})
                  (Feed.tagC "title", Feed.tagC "content:encoded"))
             (fn (item, props) =>
                 debug ("URL: " ^ item.1);
                 debug ("Title: " ^ props.1);
                 debug ("Content: " ^ props.2))
             "http://feeds.feedburner.com/marginalrevolution/hCQh";
    return <xml>
      See stdout.
    </xml>