|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /usr/lib64/python2.6/site-packages/ |
Upload File : |
Ñò
XiRc @ s9 d Z d Z d Z d d k Z d d k l Z l Z e e f Z d d k Td d k l
Z
l Z d d k l
Z
l Z l Z l Z l Z l Z l Z l Z l Z l Z e i d ƒ d
Z d „ Z y d d k Z Wn% e j
o Z e d e ƒ ‚ n Xd
e
i f d „ ƒ YZ d e
i f d „ ƒ YZ d „ Z! d S( sí A SAX2 driver for libxml2, on top of it's XmlReader API
USAGE
# put this file (drv_libxml2.py) in PYTHONPATH
import xml.sax
reader = xml.sax.make_parser(["drv_libxml2"])
# ...and the rest is standard python sax.
CAVEATS
- Lexical handlers are supported, except for start/endEntity
(waiting for XmlReader.ResolveEntity) and start/endDTD
- Error callbacks are not exactly synchronous, they tend
to be invoked before the corresponding content callback,
because the underlying reader interface parses
data by chunks of 512 bytes
TODO
- search for TODO
- some ErrorHandler events (warning)
- some ContentHandler events (setDocumentLocator, skippedEntity)
- EntityResolver (using libxml2.?)
- DTDHandler (if/when libxml2 exposes such node types)
- DeclHandler (if/when libxml2 exposes such node types)
- property_xml_string?
- feature_string_interning?
- Incremental parser
- additional performance tuning:
- one might cache callbacks to avoid some name lookups
- one might implement a smarter way to pass attributes to startElement
(some kind of lazy evaluation?)
- there might be room for improvement in start/endPrefixMapping
- other?
u Stéphane Bidoul <sbi@skynet.be>s 0.3iÿÿÿÿN( t
StringTypet UnicodeType( t *( t xmlreadert saxutils(
t feature_namespacest feature_namespace_prefixest feature_string_interningt feature_validationt feature_external_gest feature_external_pest property_lexical_handlert property_declaration_handlert property_dom_nodet property_xml_stringt utf8i c C s$ | d j o | St | ƒ d Sd S( Ni ( t Nonet _decoder( t s( ( s1 /usr/lib64/python2.6/site-packages/drv_libxml2.pyt _d<