[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: XMLinLua
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 4 Jul 2012 10:00:06 +0200
2012/7/4 steve donovan <steve.j.donovan@gmail.com>:
>
> Something like that is possible with pl.xml, with the following declarations:
>
> local xml = require 'pl.xml'
>
> local macro, names = xml.tags 'macro,names'
>
> It's easier to debug Lua than XML, so
> the tag constructors need to be declared here.
>
You have a point there. In particular, my application
(writing a CSL file for the way mathematical journals
like their references) has only a few XML tags.
On the other hand, it's also quite easy to have the
best of both worlds by letting this __index function
issue a log message when creating a new function.
Maybe you could add the Penlight XML reference to:
http://lua-users.org/wiki/LuaXml
or at least in the Penlight entry add a list of modules so
a Wiki search on "XML" catches Penlight's XML module.
(You last updated that entry over three years ago.)
I'm not complaining — writing code is never a waste of
time — but if I knew about pl.xml yesterday, I may not have
gone the way of rolling my own.