lua-users home
lua-l archive

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


Jay Carlson wrote:

I've uploaded LazyKit, a set of tools (and documentation) for processing XML in Lua. Wiki page at http://lua-users.org/wiki/LazyKit .

This looks okay, pretty much what I'm doing with XML myself.

One thought, when parsing through the lua table representaion of the XML tree, such as your xpairs function, it's worth standardising on checking for type == 'table' instead of type == 'string' as the data could be a number type or some userdata (I use an ICU binding so I can get my stings into various code pages and UTF forms for example). Might be worth putting in a function like:

function istag(x)
   return type(x) == 'table'
end

just to help keep that distinction.

Scott