XQuery/Simple RSS reader

The BBC provides a wide range of RSS news feed, e.g. UK Educational news

News Page
Reformat the RSS feed as HTML: declare option exist:serialize "method=xhtml media-type=text/html";

let $news := doc("http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/education/rss.xml") let $dateTime := $news/rss/channel/lastBuildDate return Education news from the BBC at {string($dateTime)} { for $newsItem in $news/rss/channel/item[position < 10] return {string($newsItem/title)} {string($newsItem/title/description)} more.. }

Execute

Text-to-Speech
The Opera browser with Voice extension supports text-to-speech, allowing this news to be spoken. This uses the XML vocabularies VoiceXML and XML Events. [2019-01-26 : Sadly Opera no longer supports VoiceXML]

declare option exist:serialize "method=xhtml media-type=application/xv+xml";

let $news := doc("http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/education/rss.xml") let $dateTime := $news/rss/channel/lastBuildDate let $newsItems := $news/rss/channel/item[position < 10] return    BBC Education news   {for $newsItem in $newsItems return   string($newsItem/description) }            BBC Education news at {string($dateTime)}   <h:img src="http://www.naturalreaders.com/images/laba.gif"/> </h:a> (Requires the Opera Browser with Voice extension) </h:p> { for $newsItem in $newsItems return <h:div> <h:h4>{string($newsItem/title)}</h:h4> <h:p>{string($newsItem/description)} <h:a href="{$newsItem/link}">more..</h:a></h:p> </h:div> }   </h:body> </h:html>

Execute

Note that the html namespace has been given a prefix, so that the default prefix can refer to the RSS feed.

Generic RSS reader
More generally, a reader which could voice any RSS feed would be a useful service.

UWE news Execute