lua-users home
lua-l archive

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


I couldn't agree more! XML was a nice, simple, intuitive thing until the
database mob got their baroque little minds round it and transformed it into
a horrendous mess of ill-thought-out complexity! When I have control of both
read and write I always try to use Lua itself as my data format, saving a
lot of code! Of course the unstoppable momentum of XML means we have to deal
with it, but as you say, often we can get away with ignoring the gratuitous
complexity and treating it as "Pointy-Bracket Data" (great phrase!).

I really despair of ever getting anything simple and elegant out of open
standards processes! They should all have C.A.R Hoare's warning in large
letters on their screensavers: "There are two ways of constructing a
software design: one way is to make it so simple that there are obviously no
deficiencies and the other is to make it so complicated that there are no
obvious deficiencies."

-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of steve donovan
Sent: 25 March 2009 08:59
To: Lua list
Subject: Re: Simple XHTML (XML) parser/printer

On Sun, Mar 22, 2009 at 6:50 PM, Tuomo Valkonen <tuomov@iki.fi> wrote:
> I'm looking for a simple XML parser/printer for Lua, that
> would let me manipulate an (incomplete) XHTML document
> with little effort. I was thinking of lua-expat/etree,
> but they make dealing with character entities pain.
> The lua-expat parser seems to require DTDs and stuff
> to parse the character entities; and etree doesn't
> include support for converting the whole range back.

XML in Lua seems unnecessary complicated, which is why implementations
proliferate.  Lua for Windows has _two_ implementations, luaexpat and
luaxml, at last count.  And no DOM implementation, which is a pity.
(LOM is pretty cool, however, and it would be easy to put a DOM
interface on top of that)

XML has grown beyond being a data encoding standard, and become a
particularly messy religion. Personally I like it as a data format,
without worrying about DTDs and the like.  Maybe this should be called
Pointy-Bracket Data (PBD) since it probably isn't valid XML ;)

steve d.

Attachment: smime.p7s
Description: S/MIME cryptographic signature