[XML-SIG] A first attempt at a SAX 2.0 draft

Ken MacLeod ken@bitsko.slc.ut.us
02 Mar 2000 15:52:32 -0600

Lars Marius Garshol <larsga@garshol.priv.no> writes:

> # ===== PARSER =====
> class Parser:
>     """Basic interface for SAX (Simple API for XML) parsers. All SAX
>     parsers must implement this basic interface: it allows users to
>     register handlers for different types of events and to initiate a
>     parse from a URI, a character stream, or a byte stream. SAX
>     parsers should also implement a zero-argument constructor."""

>     def parse(self, systemId):
> 	"Parse an XML document from a system identifier."
>     def parseFile(self, fileobj):
>         "Parse an XML document from a file-like object."

This should probably also have a parseCharacterStream() for upcoming
support of Unicode.

  -- Ken