RSS

Hello! I looked around at how to read RSS feeds and I found the code below. The program prints out to the Corona terminal great, but how do I get the data into a text field on the app? Parsing?

I looked at this page: http://lua-users.org/wiki/LuaXml, but it’s a little over my head.

[code]
– load needed modules
local http = require(“socket.http”)
local ltn12 = require(“ltn12”)

– a simplified http.get function
local function httpget(u)
local t = {}
local r = http.request{
url = u,
sink = ltn12.sink.table(t)
}
return t
end

local function dump(o)
if type(o) == ‘table’ then
local s = ‘{ ’
for k,v in pairs(o) do
if type(k) ~= ‘number’ then k = ‘"’…k…’"’ end
s = s … ‘[’…k…’] = ’ … dump(v) … ‘,’
local tempDisplay = display.newText(k, 0,xSize, Ghoulish, 62);
xSize = xSize + 100
end
return s … '} ’
else
return tostring(o)
end
end

local x = httpget(“http://feeds.feedburner.com/AnscaMobileBlog”)

print(dump(x))
temp = dump(x);
[/code] [import]uid: 14218 topic_id: 11914 reply_id: 311914[/import]

did you figure this out? [import]uid: 24641 topic_id: 11914 reply_id: 46825[/import]