[DOC-SIG] Re: What does this mean for Python?
Sjoerd Mullender
Sjoerd.Mullender@cwi.nl
Fri, 13 Mar 1998 13:26:15 +0100
On Fri, Mar 13 1998 Lars Marius Garshol wrote:
>
> At 12:38 13.03.98 +0100, Sjoerd Mullender wrote:
> >
> > I have a question about the timings here. How was the data fed to the
> > XML parser in xmllib.py? If you do
> > python xmllib.py hamlet.xml
> > the data is fed to the parser one character at the time.
>
> I think I fed it to the parser in 16K blocks, but I don't actually
> remember how I did it.
16K blocks shouldn't give to much extra overhead because of the
reparsing, so the figures should be pretty close to optimal for
xmllib.
> Sjoerd, please don't feel threatened by my making my own parser. I did it
> partly for fun and partly to better understand the interplay between XML
> entities, well-formedness checking, validation, grove building and what
> actually goes to the application. So it was not because of dissatisfaction
> with xmllib, but because I wanted to understand these things better.
I don't feel threatened. I was the first to create an XML parser for
Python, and nobody can take that away. :-)
> In fact, when I use xmllib with the SAX canonical XML outputter I seem to
> get the same results that James Clarks XP gives, so it looks as though
> xmllib pretty much follows the standard. (I haven't done any rigorous
> testing, just tested some features I were uncertain about.)
I looked hard at the XML spec when implementing it, so I feel pretty
confident that it is reasonably close. I did some more work after 1.5
came out, so my current version is even better (though not necessarily
faster).
-- Sjoerd Mullender <Sjoerd.Mullender@cwi.nl>
<URL:http://www.cwi.nl/~sjoerd/>
_______________
DOC-SIG - SIG for the Python Documentation Project
send messages to: doc-sig@python.org
administrivia to: doc-sig-request@python.org
_______________