[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Simple XHTML (XML) parser/printer
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 25 Mar 2009 15:13:12 +0200
On Wed, Mar 25, 2009 at 2:55 PM, Tuomo Valkonen <email@example.com> wrote:
> Anyway, I got lxp.lom to parse the XHTML (or at least not complain of
> the entities) by specifying doctype. But now it still remains to find
> a way to print them again. Maybe it's possible to make expat not parse
> the entities by specifying some callbacks... I haven't yet had the time
> to try.
LuaXML may be another candidate, since once the document is read in,
it can be modified and converted into text again (xml.str(), also
defines __tostring appropriately). Also, it's much less C code if you
need to do entity hacking ;)
PS. XML is best seen as an exchange format. As an example of another
truly horrendous exchange format, see AutoCAD's DXF.