# HG changeset patch # User Matthew Wild # Date 1284731265 -3600 # Node ID c04d4fd346851b8d1c4b9cbd815725037e72b79d # Parent ee74a5e9419b4370ef1c6117d361498a4c657669 demo_string.lua: Example opening a feed from a string diff -r ee74a5e9419b -r c04d4fd34685 demo_string.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/demo_string.lua Fri Sep 17 14:47:45 2010 +0100 @@ -0,0 +1,30 @@ +require "feeds" + +-- Example feed as a string (only a single entry in this example) +local feed = feeds.feed_from_string [[ + Planet Jabber + + + + 2010-09-17T13:39:01+00:00 + http://intertwingly.net/code/venus/ + + Fabio Forno: Glider Blackberry Beta is out + + http://blog.bluendo.com/ff/glider-blackberry-beta-is-out2 + 2010-09-15T12:26:10+00:00 + <p>After a long silence (and hard work) we are really excited for the release of the first beta of Glider for Blackberry. If you are impatient you can go directly <a href="http://www.mobihand.com/ProductPreview.asp?id=85809&amp;gnContentType=1">here</a> and download it.</p><p>This beta version is free and it will expire when new releases will be available. After the beta period you will have two options: a free ads supported version and a full pro version at an affordable price. </p><p>Glider is the multiplatform XMPP Client by Ooros, based on the open code of Lampiro. Glider exclusive features are:</p><ul><li>touchscreen support</li><li>blackberry device integration</li><li>simplified setup<br /></li><li>notifications of new messages when in background</li><li>automatic reconnect</li><li>network configuration</li><li>integrated news reader based on the efficient pubsub protocol <br /></li><li>moneiro: the Ooros platform for mobile payments</li></ul>Stay tuned, since very soon we will have news for Android and iPhone too! + + Fabio Forno + + + +]]; + +print(feed.title); +print(""); + +for _, entry in ipairs(feed) do + print(entry:get_child("title"):get_text()); + print("", entry:get_child("link").attr.href); +end