[XML-SIG] Uniform interface with Python 2.0

Paul Prescod paul@prescod.net
Thu, 14 Sep 2000 08:37:18 -0700


"Martin v. Loewis" wrote:
> 
>...
> 
> It's not SAX compatible, though, is it? 

We're defining SAX: for Python.

> In SAX, I'd expect to create a
> reader object using some out-of-scope operation, then invoke
> setContentHandler() on this object. I think that should be supported
> somehow.

That's totally supported it just isn't the default way to do things. It
puts the emphasis on the parser when the programmer's emphasis is
typically on their XML file and their handler.

> What was wrong with sax2utils.make_parser() to not include it in
> Python 2?

There's nothing wrong with make_parser but the first priority is getting
people parsing with the fewest possible steps. Those who want to do the
"parser first" can create an ExpatParser. I think that there are
probably a few situations where you don't care what parser you get but
you want a "first class" parser before you begin parsing. We could add
make_parser for those situations but it isn't personally my first
priority. You could submit a patch.


-- 
 Paul Prescod - Not encumbered by corporate consensus
Simplicity does not precede complexity, but follows it. 
	- http://www.cs.yale.edu/homes/perlis-alan/quotes.html