lua-users home
lua-l archive

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


Alex Sandro Queiroz e Silva wrote :
>library (in Lua) to convert tables (or environments) to XML for
>distributed systems. What about that?

Yes, I agree. Since Lua is powerful enough to handle XML files,
a guideline for table usage would be helpful for people to share
programs. I think we can simplify a method proposed in this 
mailing list by Roberto <roberto@inf.puc-rio.br>:

                   <section link="hi">
                      <title>Hello</title>
                      This is only a text <ldots/> and more text
                    </section>

                    will result in a tree like

                    { xml = "section", link="hi";
                      { xml = "title"; "Hello"},
                      "This is only a text ",
                      { xml = "ldots"},
                      " and more text"
                    }

Because, the name "xml" never appears in attribute names in a tag,
the tag name is described as a property "xml". It simplifies the result 
tree.
My experimental code is http://www.etl.go.jp/~ueno/lua/test/

---ueno