[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: XML Support for Penlight?
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 29 Mar 2011 15:59:08 +0200
On Mon, Mar 28, 2011 at 9:18 PM, Petite Abeille
> 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 ;)]