A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/068511.html below:

xml parsing with sax

xml parsing with sax xml parsing with saxAlex Martelli aleaxit at yahoo.com
Sun Apr 29 17:38:18 EDT 2001
"Harald Kirsch" <kirschh at lionbioscience.com> wrote in message
news:yv2y9sm469d.fsf at lionsp093.lion-ag.de...
    [snip]
> > Fortunately, the parser just calls .read(N) on its
>
> *That* was the information I was missing. The rest is then more or
> less straighforward, as your example code demonstrates.

This is not a formally documented constraint on the parser (alas,
until and unless interfaces or protocols do get formalized in Python,
we'll have to live with lots of informal mentions of [e.g.] "file-like
objects" that never clarify WHICH file-object methods do need to
be implemented...), but for the current implementation it can be
determined experimentally.  Code inspection on the library sources
AND running a few experiments on an instrumented filelike object
(that delegates all to a file but also prints out what is being called)
to confirm one's understanding gives you that with a few minutes'
investment.


Alex




More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4