ž ryMa¯ c@sxdZddlmZddlmZmZddlmZmZm Z m Z m Z eƒdd„Z eƒdd„Z d gZd Zerœd d lZnd d lZd d lZd ejkrÜejd jd ƒZn[dZejd d…dkr.ejjeƒr.ejjeƒjd ƒZngdd„Zejd d…dkredd„Zn dd„Z[d S(uÛ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. i(u InputSource(uContentHandleru ErrorHandler(u SAXExceptionuSAXNotRecognizedExceptionuSAXParseExceptionuSAXNotSupportedExceptionuSAXReaderNotAvailablecCs4tƒ}|j|ƒ|j|ƒ|j|ƒdS(N(u make_parserusetContentHandlerusetErrorHandleruparse(usourceuhandleru errorHandleruparser((u5/opt/alt/python33/lib64/python3.3/xml/sax/__init__.pyuparses   uparsecCsxddlm}|dkr(tƒ}ntƒ}|j|ƒ|j|ƒtƒ}|j||ƒƒ|j |ƒdS(Ni(uBytesIO( uiouBytesIOuNoneu ErrorHandleru make_parserusetContentHandlerusetErrorHandleru InputSourceu setByteStreamuparse(ustringuhandleru errorHandleruBytesIOuparseruinpsrc((u5/opt/alt/python33/lib64/python3.3/xml/sax/__init__.pyu parseString#s      u parseStringuxml.sax.expatreaderiNu PY_SAX_PARSERu,upython.xml.sax.parseriujavacCsxz|tD]n}yt|ƒSWq tk rg}z&ddl}||jkrU‚nWYdd}~Xq tk rxYq Xq Wtddƒ‚dS(u&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.iNuNo parsers found(udefault_parser_listu_create_parseru ImportErrorusysumodulesuSAXReaderNotAvailableuNone(u parser_listu parser_nameueusys((u5/opt/alt/python33/lib64/python3.3/xml/sax/__init__.pyu make_parserDs   u make_parsercCs2ddlm}|j|dtƒƒ}|jƒS(Ni(uimp(uorg.python.coreuimpu importNameuglobalsu create_parser(u parser_nameuimpu drv_module((u5/opt/alt/python33/lib64/python3.3/xml/sax/__init__.pyu_create_parser_su_create_parsercCs"t|iidgƒ}|jƒS(Nu create_parser(u __import__u create_parser(u parser_nameu drv_module((u5/opt/alt/python33/lib64/python3.3/xml/sax/__init__.pyu_create_parseres(u__doc__u xmlreaderu InputSourceuhandleruContentHandleru ErrorHandleru _exceptionsu SAXExceptionuSAXNotRecognizedExceptionuSAXParseExceptionuSAXNotSupportedExceptionuSAXReaderNotAvailableuparseu parseStringudefault_parser_listu_falseuxml.sax.expatreaderuxmluosusysuenvironusplitu_keyuplatformuregistryu containsKeyu getPropertyu make_parseru_create_parser(((u5/opt/alt/python33/lib64/python3.3/xml/sax/__init__.pyus*( +