lua-users home
lua-l archive

Dynamic table creation

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


Hello,
I am parsing XML data using LuaExpat.
I am wanting to traverse the lxp.lom.parse() tables and recreate the objects using the string from the tag as the name of the new table.
So basically how do I do something like:
'TableName' = {}
and be valid Lua?
I guess basically it this, how can I make a string become the name of the variable?
If this is an FAQ my apologies. I did not find it in my search.
Any help greatly appreciated.
Jimmie

AltStyle によって変換されたページ (->オリジナル) /