Re: Module to work with RSS
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Module to work with RSS
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: 2010年11月28日 12:14:06 -0200
> I'm looking for Lua module(s) to work with RSS.
The code below parses http://www.lua.org/news.rss for instance.
It may be a start.
local function parse(name,t)
local leaf=true
for k,b in string.gmatch(t, "<(%w+).->(.-)</%1>") do
parse(name..k..".",b)
leaf=false
end
if leaf then print(name,t) end
end
parse("",io.read"*a")