lua-users home
lua-l archive

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


Philippe Lhoste wrote :
>> Anyone written an XML parser for Lua?
>
>I have this file on my collection of Lua programs...
>I don't know where I found it, hope this help.

That is my test program, which is now revised.
http://www.etl.go.jp/~ueno/lua/test/
But it is only tested for a few XML files used in biology.
Probably Roberto's code provides a better skelton than mine,
but there is a difference in xml-tag descriptions with Lua tables.

XML :      <methodCall kind="xuxu">

Lua by Roberto: { label="methodCall", args={kind="xuxu"} }

Lua by Ueno:    { xml="methodCall", kind="xuxu" }

Because the property name "xml" never appears in XML.
This method is a bit better for terribly deep XML tags 
proposed in biology.

---ueno