FeedReader example
This example imports an RSS feed and displays it as an unordered list.
Smartsite SXML | Copy Code |
---|---|
<se:feedreader location="SAMPLE_RSS_FEED_SCREWDRIVERS" maxrows="50" save="data" resulttype="datatable" /> <se:format inputdata="data"> <se:parameters> <se:parameter name="format"> <se:rowformat expression="this.field(depth)==0" trim="both"> {buffer.set(rsstitle, this.field(title))} </se:rowformat> <se:rowformat trim="both"> <li> <a href="{url.setrelative(this.location())}">{this.field(title)}</a><br /> {this.field(description)} </li> </se:rowformat> </se:parameter> <se:parameter name="resultformat"> <ul> {this.result()} </ul> </se:parameter> </se:parameters> </se:format> |
Example Result | Copy Code |
---|---|
<ul> <li> <a href="/doc/Data_used_by_Code_Examples/Shop/Shop-Tools/Screwdrivers/Screwdriver_Deluxe_170.html">Screwdriver Deluxe 170</a><br /> </li><li> <a href="/doc/Data_used_by_Code_Examples/Shop/Shop-Tools/Screwdrivers/Screwdriver_300GT.html">Screwdriver 300GT</a><br /> </li><li> <a href="/doc/Data_used_by_Code_Examples/Shop/Shop-Tools/Screwdrivers/Screwdriver_XL_Plus.html">Screwdriver XL Plus</a><br /> </li> </ul> |