mς &U²Ic@sWdZdklZdklZlZdklZlZl Z l Z l Z eƒd„Z eƒd„Z dgZdZeo dkZndkZdkZeiid ƒoeid id ƒZn[d Zeid d jo2eiieƒoeiieƒid ƒZngd„Zeid d jo d„Zn d„Z[dS(sΫSimple API for XML (SAX) implementation for Python. This module provides an implementation of the SAX 2 interface; information about the Java version of the interface can be found at http://www.megginson.com/SAX/. The Python version of the interface is documented at <...>. This package contains the following modules: handler -- Base classes and constants which define the SAX 2 API for the 'client-side' of SAX for Python. saxutils -- Implementation of the convenience classes commonly used to work with SAX. xmlreader -- Base classes and constants which define the SAX 2 API for the parsers used with SAX for Python. expatreader -- Driver that allows use of the Expat parser with SAX. (s InputSource(sContentHandlers ErrorHandler(s SAXExceptionsSAXNotRecognizedExceptionsSAXParseExceptionsSAXNotSupportedExceptionsSAXReaderNotAvailablecCs4tƒ}|i|ƒ|i|ƒ|i|ƒdS(N(t make_parsertparsertsetContentHandlerthandlertsetErrorHandlert errorHandlertparsetsource(RRRR((t-/data/zmath/lib/python2.4/xml/sax/__init__.pyRs   cCsžydkl}Wn tj odkl}nX|djo tƒ}ntƒ}|i|ƒ|i |ƒt ƒ}|i ||ƒƒ|i|ƒdS(N(sStringIO(t cStringIOtStringIOt ImportErrorRtNonet ErrorHandlerRRRRRt InputSourcetinpsrct setByteStreamtstringR(RRRR RR((Rt parseString#s      sxml.sax.expatreaderiNt PY_SAX_PARSERt,spython.xml.sax.parseritjavacCsƒxm|tD]a}yt|ƒSWq tj o,}dk}|ii|ƒo‚qlq t j oq Xq Wt ddƒ‚dS(s&Creates and returns a SAX parser. Creates the first parser it is able to instantiate of the ones given in the list created by doing parser_list + default_parser_list. The lists must contain the names of Python modules containing both a SAX parser and a create_parser function.NsNo parsers found( t parser_listtdefault_parser_listt parser_namet_create_parserR tetsystmodulesthas_keytSAXReaderNotAvailableR (RRRR((RRGs    cCs/dkl}|i|dtƒƒ}|iƒS(N(simpi(torg.python.coretimpt importNameRtglobalst drv_modulet create_parser(RR R#((RRbs cCs"t|hhdgƒ}|iƒS(NR$(t __import__RR#R$(RR#((RRhs(t__doc__t xmlreaderRRtContentHandlerR t _exceptionst SAXExceptiontSAXNotRecognizedExceptiontSAXParseExceptiontSAXNotSupportedExceptionRRRRt_falsetxml.sax.expatreadertxmltosRtenvironRtsplitt_keytplatformtregistryt containsKeyt getPropertyRR(R0RRR+RRR R(RRRR.R*R,R-RR1R4((Rt?s* %  '