|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/21572/root/usr/lib64/python2.4/site-packages/ |
Upload File : |
mò
¢=nTc @ s' d Z d Z d Z d k Z d k l Z l Z e e f Z d k Td k l
Z
l Z 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 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.3N( s
StringTypes UnicodeType( t *( s xmlreaders saxutils(
s feature_namespacess feature_namespace_prefixess feature_string_internings feature_validations feature_external_gess feature_external_pess property_lexical_handlers property_declaration_handlers property_dom_nodes property_xml_stringt utf8i c C s' | d j o | Sn t | ƒ d Sd S( Ni ( t st Nonet _decoder( R ( ( t1 /usr/lib64/python2.4/site-packages/drv_libxml2.pyt _d<