lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 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")