Return to Snippet

Revision: 62498
at February 27, 2013 17:42 by alces


Initial Code
<table border=0 align=center>
<%
new XmlParser().parse('http://rss.cbc.ca/lineup/world.xml').channel.item.each {
	it.description.text().find('(<img [^>]+>).*<p>([^<]+)</p>') {mtc, img, txt ->
		out << """<tr><td rowspan=2>$img</td><th>${it.title.text()}</th></tr>
		<tr><td>$txt</td></tr>"""
	}
}
%>
</table>

Initial URL
cbc_world_news_gsp

Initial Description
Reads CBC news RSS with fancy-prints its in table, splitting news description by image & text.

Initial Title
CBC World News RSS parser

Initial Tags
regexp, find

Initial Language
Groovy