Re: What would be a good representation of XML tree as Lua tables?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: What would be a good representation of XML tree as Lua tables?
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2016年8月22日 13:59:19 -0300
> In Prosody we have a library called util.stanza which deals with
> building and traversing XML trees. They have the following basic structure:
>
> { name = 'x', attr = { foo = 'bar' }, tags = { ... }, ... }
I like this format. It is quite similar to what my original
quick-and-dirty XML parser in Lua did (except that it used 'label'
instead of 'name', 'args' instead of 'attr', and does not have 'tags').
-- Roberto