[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: and Lua marches on
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 16 Dec 2009 18:24:55 +0200
On Wed, Dec 16, 2009 at 5:41 PM, Joshua Jensen
<jjensen@workspacewhiz.com> wrote:
> for _, entity in ipairs(xml.Config[1]['#'].EntityList[1]['#'].Entity) do
> local text = type(entity['#']) == 'string' and entity['#'] or ''
> print('Entity: value=' .. entity['@'].value .. ' - ' .. text)
> end
Cute, but what purpose does the ['#'] serve? Why not:
xml.Config[1].EntityList[1].....
steve d.
PS. I think we need a generalized XPath-like library for Lua tables
PPS. I still think LuaExpat's LOM to be the canonical representation
- References:
- Re: and Lua marches on, Nikolai Kondrashov
- Re: and Lua marches on, Jacques Chester
- Re: and Lua marches on, Francesco Abbate
- Re: and Lua marches on, Tobias Kieslich
- Re: and Lua marches on, Bertrand Mansion
- Re: and Lua marches on, Tobias Kieslich
- Re: and Lua marches on, steve donovan
- Re: and Lua marches on, Vaughan McAlley
- Re: and Lua marches on, Javier Guerra
- Re: and Lua marches on, Joshua Jensen