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:

from http://www.w3schools.com/xml/xml_elements.asp

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>

http://doc.lubyk.org/xml.html

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

> git clone https://github.com/lubyk/xml.git
> cd xml
> luarocks make

G.


On Thu, Feb 6, 2014 at 8:33 AM, steve donovan <steve.j.donovan@gmail.com> wrote:
On Wed, Feb 5, 2014 at 10:21 PM, Petite Abeille
<petite.abeille@gmail.com> wrote:
> $ ./xml2 <<\EOF
> <a1>t1<a2>t2</a2>t3</a1>
> EOF
>
> /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.




--

                                                               Gaspard