[XML-SIG] DOM API
Mon, 19 Apr 1999 01:14:39 -0700
Lars Marius Garshol wrote:
> * Greg Stein
> | Didn't hear back on that, though... does anybody have any feelings
> | one way or another about including the module?
> I think it makes sense to have something a bit more lightweight and
> easier to use than the DOM. However, why not build it on top of SAX
> instead of pyexpat? No reason to restrict ourselves to just one
> parser, is there?
No particular reason, although it will be somewhat slower if based on
SAX. I see in drv_pyexpat.py that the startElement handler does a good
bit of work before getting to the "real" start handler. It would be nice
to skip that :-) (honestly, though, I don't know what kind of overhead
It might be nice to switch it to SAX and bench the pure pyexpat version
against the SAX version.
I do agree that SAX-based would be the Right Thing, but I'm also willing
to trade that for speed since people can always use the DOM if they need
to use a different, underlying parser (such as xmlproc).
Greg Stein, http://www.lyra.org/