lua-users home
lua-l archive

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


Suppose we have the following table:

t =


{country = 'Brazil', city = 'São Paulo'},

{country = 'Italy', city = 'Napoli'},

{country = 'France', city = 'Nantes'},

{country = 'United States', city = 'Chicago'}


I know how to add or remove elements. But, how to save it in a file? With Luasql, I can save it, for example, in a Sqlite database. Using Luaxml, I can change it into string and save in a XML file.

I can't use file:wirte(t), because t should be a string.

Are there other ways to save a table into a file?


Luciano de Souza