lua-users home
lua-l archive

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


On Fri, Mar 7, 2008 at 1:36 PM, Mark Hamburg <mhamburg@adobe.com> wrote:
> One downside to XML v both Lua and JSON is that XML has trouble mapping into
>  conventional data structures -- e.g., is that element a property of the
>  parent or a sub-element? One can represent data structures in XML -- though
>  it's a bit awkward with respect to dictionaries -- but there isn't a natural
>  mapping from arbitrary XML back to standard data structures.

this is an inherent drawback of XML itself, not of any
library/language/implementation.

IMO, it's important to decide at the start of any use of XML what are
you using it for. if it's for 'structures' an E4X-like API is great.
if it's for 'documents' a SAX-like API will do nicely enough.  if it's
for 'all under the XML universe and beyond' you're stuck with
abominations like DOM.

which remembers me... i've never published my L4X module anywhere...
it's waiting until i get some 'inspiration' and add the ability to
modify the data (IOW, in deep freeze).  should i publish it somewhere
as is? (read-only but quite nice to use)

-- 
Javier