[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: XMLinLua
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 4 Jul 2012 11:04:20 +0200
On Wed, Jul 4, 2012 at 10:00 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> Maybe you could add the Penlight XML reference to:
>
> http://lua-users.org/wiki/LuaXml
Yes, sorry about that - I've been fixing Penlight references in the
wiki to point to the Github page.
But as you say, this kind of coding is very entertaining - this code
was originally based on Prosody's stanza.lua, and originally was just
to bring pretty-printing to LOM documents, but then it just .. grew.
https://github.com/stevedonovan/Penlight/blob/master/lua/pl/xml.lua
This is _almost_ self-contained, just needs pl.utils.lua for splitting
strings - easy enough to code that. My policy now is to reduce
inter-module dependencies so that people can just pick & choose (for
instance, stringio is available from LuaRocks as a separate package.)
I hesitated in putting in XML support in Penlight, because as a rule
I've avoided 'specialized' code that belongs in a different 'universe'
- and XML people definitely inhabit a different universe! However,
there are so many _little_ bits of XML out there that I felt a 21st
century library should know how to speak it.
steve d.