Lists Home |
Date Index |
Rob Lugt wrote:
> [...snip...] Surely Perl hackers use expat to do the hard work these days?
Many moons ago I wrote a regexp-based XML parser for Tcl.
That was followed-up shortly after by a wrapper for expat (TclExpat).
Naturally, my belief was that the pure-Tcl parser would fade
into obscurity, being (at least) 20 times slower than expat.
Much to my surprise, most of the correspondance and bug reports
that I get (bear in mind that a bug report means someone is
seriously using the thing) are for the pure-Tcl parser, not TclExpat.
It turns out that different parsers have characteristics that
are useful in certain situations. A good engineer can determine
what is the best tool for a given job.
As far as changes to make XML simpler go, for your proposals I
say NO NO NO. The second and third items make parsing XML
using simple tools, like REs, MUCH more difficult (it is difficult
enough already to do a proper job).
The first item (abbreviate end tags to </>) I don't like from
the pov of error recovery. This form of abbreviation does not
make parsing easier, but nor does it make it harder. Everything
is hunky-dory when the document is well-formed, but when that
is not the case (by virtue of author error, transmission fault,
cut-and-paste, whatever) then the task of correcting the problem
becomes much more difficult.
I recall this issue being thrashed out on this very list years ago,
so I suggest you consult the archives.
Steve Ball | XSLT Standard Library | Training & Seminars
Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas
http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development
Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099