[prev in list] [next in list] [prev in thread] [next in thread]
List: python-xml-sig
Subject: [XML-SIG] Sgmlop SAX 2 parser
From: larsga () garshol ! priv ! no (Lars Marius Garshol)
Date: 2001-07-26 8:18:24
Message-ID: m3ofq8umr3.fsf () lambda ! garshol ! priv ! no
[Download RAW message or body]
Hi Alexandre,
* Alexandre Fayolle
|
| Here's a first version of my attempt at providing a SAX2 parser for
| Sgmlop. It still features some debugging prints. I'd be very grateful if
| you could scrutinize it hard and tell me what you think of it. I'll be
| back online on Monday.
This looks reasonable to me. I haven't tested it, or looked at what it
does with encodings, but the general approach seems like it will work
just fine.
Some minor nits:
- set_property should be setProperty
- you don't need prepareParser, it's just there to make subclassing
IncrementalParser easier, but you don't do that
- I think you omit the startDocument() element if someone only uses
the feed, close, and reset methods, without going via parse
- the experimental Python extensions you can just remove, that is
stuff from SAX 1.0
- the SaxHtmlParser looks good, but it should get its own module so
that it is accessible via xml.sax.make_parser
BTW: I needed HTML parsing yesterday, and, forgetting Alexandre's
contribution, I added drivers for sgmllib and htmllib to
xml.sax.drivers2. So we should be well covered in terms of SGML
and HTML parsing now.
--Lars M.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic