Read and process RSS feed using Embed and XmlProcessor

The feedreader macro, in the Web Toolkit, allows you to read RSS and convert its data to a DataTable, which can then be formatted. It is however possible to read the xml yourself and pass it to a transform macro, or use the XmlProcessor (new in 1.3).

Here's an example of XmlProcessor processing a feed:

Smartsite SXML CopyCode image Copy Code
<se:cache maxage="00:20" save="key = this.getcachekey()" resulttype="none" whitespace="remove">
    <se:embeduri resulttype="xml" location="" />

<se:xmlprocessor xmldata="{cache.get(buffer.get(key))}" buildstring="true">
        <se:parameter name="resultformat">
        <se:parameter name="actions">
                <se:member query="//channel/item" type="multiplenodes">
                    <li><a href="{this.getvalue(link)}">{this.getvalue(title)}</a></li>
Example Result CopyCode image Copy Code
    <li><a href="">Suicide bombers target Iraqi security forces</a></li>
    <li><a href="">Tunisian protesters return to streets</a></li>
    <li><a href="">Envoy blames Gbagbo for Ivorian crisis</a></li>
    <li><a href="">Charges filed against 'Baby Doc' Duvalier</a></li>
    <li><a href="">White House dinner for China's Hu</a></li>
    <li><a href="">Brazil flood death toll passes 700</a></li>
    <li><a href="">Bolivia seeks buzz with coca campaign</a></li>
    <li><a href="">Australian flooding 'whacks' economy</a></li>
    <li><a href="">Major earthquake strikes Pakistan</a></li>
    <li><a href="">New court hearing on honeymoon death</a></li>