Rh $dZddlmZddlmZmZddlmZmZm Z m Z m Z efdZ efdZ dgZdZerdd lZdd lZdd lZej(j*s,d ej,vrej,d j/d Z[[dd Zd Zy )aSimple 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. ) InputSource)ContentHandler ErrorHandler) SAXExceptionSAXNotRecognizedExceptionSAXParseExceptionSAXNotSupportedExceptionSAXReaderNotAvailablec~t}|j||j||j|y)N) make_parsersetContentHandlersetErrorHandlerparse)sourcehandler errorHandlerparsers '/usr/lib/python3.12/xml/sax/__init__.pyrrs1 ]F W% <( LLcTddl}| t}t}|j||j |t }t |tr!|j|j|n |j|j||j|y)N) iorr r rr isinstancestrsetCharacterStreamStringIO setByteStreamBytesIOr)stringrrrrinpsrcs r parseStringr!#s #~ ]F W% <( ]F&#!!"++f"56RZZ/0 LLrzxml.sax.expatreaderrN PY_SAX_PARSER,ct|tzD]} t|cSt dd#t$rddl}||j vrY>   !+. .  2D 99  ckk)*%   s 1AAAc@t|iidg}|jS)N create_parser) __import__r.)r, drv_modules rr'r'\s$K2.?@J  # # %%r))__doc__ xmlreaderrrrr _exceptionsrrrr r rr!r&_falsexml.sax.expatreaderxmlosr)flagsignore_environmentenvironsplitr r'r1rrr=s*#1.. )5 /;n $--   yy##2::(E**_5;;C@:4&r