lua-users home
lua-l archive

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


On Mon, Mar 28, 2011 at 9:18 PM, Petite Abeille
<petite.abeille@gmail.com> wrote:
> Talking of which, I like David Sklar's BadgerFish convention for translating an XML document into a Lua table:
> ...
> print( anXML.rss.channel.description[ '$' ] )

It gives you a nice XPath-like notation, and it is an optimal
representation for certain common XML uses.

But, it cannot represent arbitrary XML, such as <div>here is
<b>text</b>for you</div>, and in general element order cannot be
preserved on output.

So, I'm still tending towards LOM representation, even though it is
not always the most efficient representation.

Or just put both in.   [a classic political compromise ;)]

steve d.