[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: What would be a good representation of XML tree as Lua tables?
- From: Martin <eden_martin_fuhrspam@...>
- Date: Sun, 21 Aug 2016 20:38:53 -0700
On 16-08-21 07:45 AM, Marc Balmer wrote:
> I am working on code to easily create XML trees from Lua tables. What would,
> in your opinion, be a comfortable Lua table notation of XML trees, expressed
> as Lua tables?
>
For me for structure like
<data>
<el attr1="value1", attr2="value2">
el_data
</el>
<el attr1="value1", attr2="value2">
el_data
</el>
</data>
expressions "xml.data.el[1].value" or
"xml.data.el[#xml.data.el].attrs['attr2']" looks convenient.