lua-users home
lua-l archive

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

You can use the 'xml' attribute to define the tag since this attribute is not legal in xml anyway:


Names cannot start with the letters xml (or XML, or Xml, etc)

This is what I use in the 'xml' rock (uses RapidXML).

Lua: {xml='p', 'Hello ', {xml='span', class='name', 'Lua'}, ' !'}
xml: <p>Hello <span class='name'>Lua</span> !</p>

Since luarocks is having some trouble (and xml 1.1.0 is not released, please install from sources):

> git clone
> cd xml
> luarocks make


On Thu, Feb 6, 2014 at 8:33 AM, steve donovan <> wrote:
On Wed, Feb 5, 2014 at 10:21 PM, Petite Abeille
<> wrote:
> $ ./xml2 <<\EOF
> <a1>t1<a2>t2</a2>t3</a1>
> /a1=t1
> /a1/a2=t2
> /a1=t3

That is rather cute - building up dotted keys. Although on the Lua
side it cries out for using '.' instead of '/'

steve d.