[XML-SIG] Error using xml.sax.{xmlreader,expatreader}

Ender kthangavelu@earthlink.net
Tue, 28 Nov 2000 17:29:15 -0800

> In SAX2, the characters method only has a single argument (besides self),
> so it should be

is there a spec for sax2 somewhere, i browsed around megginson.com and
searched google looking for a clarification, i saw this


which implies the same characters interface as i have been using from an
older version of pyxml.

going through the java code dated 5/00 also implies the same interface.

is this a python deviation, or am i just unable to find the latest spec?
further browsing (sorry if i'm being gratitous, this is just disturbing
to me cause i just standardized on sax2 throughout my application)

the legacy interface

and the current interface

neither of which shows the characters method defined below.

browsing through my search results on a google, i'm unable to find any
spec or tutorial that shows otherwise.

any doc links or clarifications about the current spec would be greatly
appreciated, also is there any intention of maintaining a legacy sax
interface for older applications?

kapil thangavelu

>         def characters(self, chars):
>                 if not self.in_field:
>                         raise DataError("characters outside a field: %s" % `chars`)
>                 self.chars.append(chars)
> There is a problem with the traceback, though - since characters is
> called from C code, and since that call happens to fail, the topmost
> Python stack frame is the one where expatreader calls into the C code.
> Any hints for improving the error reporting are
> appreciated. Delegating the calls from pyexpat to a method in
> expatreader first is not acceptable, though, due to the expected
> overhead of an additional call in the normal case.
> Regards,
> Martin
> _______________________________________________
> XML-SIG maillist  -  XML-SIG@python.org
> http://www.python.org/mailman/listinfo/xml-sig