%+ DOC COMMENT BEGIN % This Xcerpt program retrieves the headlines of the % Sueddeutsche Zeitung from % the RSS feed provided by News Is Free. %+ DOC COMMENT END goal { cons { out { resource { "stdout:", "xml" }, html [ head [ title [ "Sueddeutsche Zeitung: Schlagzeilen" ] ], body [ var Channel ] ] } }, query { var Channel -> div {{ attributes {{ id { "sueddeutsche" } }} }} } } rule { cons { div [ attributes { id { "sueddeutsche" } }, h1 [ "Channel:", var Channel ], table [ all [ tr [ td [ var Title ], td [ a [ attributes { href { var Link } }, var Link ] ] ] ] ] ] }, query { in { resource { "http://www.newsisfree.com/HPE/xml/feeds/44/1541.xml" }, rss [[ channel [[ title [[ var Channel ]], item [[ title [[ var Title ]], link [[ var Link ]] ]] ]] ]] } } }