[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Representing XML in tables
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 3 Jul 2003 14:29:11 -0300
>Has there been any standerd way of representing a XML document in a lua
>table structure defined yet?
><person id="1234">
> <name>
> <first>John</first>
> <last>Smith</last>
> </name>
></person>
I don't know anything about XML, but in Lua this info could be represented as
person{
id="1234",
{
name={first="John", last="Smith"}
}
}
The main difference is that I've made the representation "active" at the
top-level, that is, a "person" function will be called when the file is loaded.
On the other hand, why didn't I make "name" active as well? I guess there's
no right answer.
--lhf