Ë
    òT•j¦  ã                   ó$  — d Z ddlmZ ddlmZmZ ddlmZmZm	Z	m
Z
mZ  e«       fd„Z e«       fd„ZdgZdZerdd	lZdd	lZdd	lZej(                  j*                  s,d
ej,                  v rej,                  d
   j/                  d«      Z[[dd„Zd„ Zy	)aÛ  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.
é   )ÚInputSource)ÚContentHandlerÚErrorHandler)ÚSAXExceptionÚSAXNotRecognizedExceptionÚSAXParseExceptionÚSAXNotSupportedExceptionÚSAXReaderNotAvailablec                 ó~   — t        «       }|j                  |«       |j                  |«       |j                  | «       y )N)Úmake_parserÚsetContentHandlerÚsetErrorHandlerÚparse)ÚsourceÚhandlerÚerrorHandlerÚparsers       ú'/usr/lib/python3.12/xml/sax/__init__.pyr   r      s1   € Ü‹]€FØ
×Ñ˜WÔ%Ø
×Ñ˜<Ô(Ø
‡L�L�Õó    c                 óT  — dd l }|€
t        «       }t        «       }|j                  |«       |j	                  |«       t        «       }t        | t        «      r!|j                  |j                  | «      «       n |j                  |j                  | «      «       |j                  |«       y )Né    )Úior   r   r   r   r   Ú
isinstanceÚstrÚsetCharacterStreamÚStringIOÚsetByteStreamÚBytesIOr   )Ústringr   r   r   r   Úinpsrcs         r   ÚparseStringr!   #   s€   € ÛØÐÜ#“~ˆÜ‹]€FØ
×Ñ˜WÔ%Ø
×Ñ˜<Ô(ä‹]€FÜ�&œ#ÔØ×!Ñ! "§+¡+¨fÓ"5Õ6à×Ñ˜RŸZ™Z¨Ó/Ô0Ø
‡L�L�Õr   zxml.sax.expatreaderr   NÚPY_SAX_PARSERú,c                 óº   — t        | «      t        z   D ]  }	 t        |«      c S  t        dd«      ‚# t        $ r ddl}||j
                  v r‚ Y Œ<t        $ r Y ŒFw xY w)a3  Creates and returns a SAX parser.

    Creates the first parser it is able to instantiate of the ones
    given in the iterable created by chaining parser_list and
    default_parser_list.  The iterables must contain the names of Python
    modules containing both a SAX parser and a create_parser function.r   NzNo parsers found)ÚlistÚdefault_parser_listÚ_create_parserÚImportErrorÚsysÚmodulesr
   )Úparser_listÚparser_namer)   s      r   r   r   B   sw   € ô ˜KÓ(Ô+>Ñ>ò ˆð	Ü! +Ó.Ò.ðô  Ð 2°DÓ
9Ð9øô ò 	ÛØ˜cŸk™kÑ)ð ñ *ô %ò 	ñ ð	ús   —
1±AÁAÁAc                 ó@   — t        | i i dg«      }|j                  «       S )NÚcreate_parser)Ú
__import__r.   )r,   Ú
drv_modules     r   r'   r'   \   s$   € Ü˜K¨¨2¨Ð.?Ó@€JØ×#Ñ#Ó%Ð%r   )© )Ú__doc__Ú	xmlreaderr   r   r   r   Ú_exceptionsr   r   r   r	   r
   r   r!   r&   Ú_falseÚxml.sax.expatreaderÚxmlÚosr)   ÚflagsÚignore_environmentÚenvironÚsplitr   r'   r1   r   r   ú<module>r=      s�   ðñõ* #ß 1÷.õ .ñ
 )5«ó ñ /;«nó ð$ -Ð-Ð ð 
€Ù	Ûç Ø
‡y�y×#Ò#¨¸2¿:¹:Ñ(EØŸ*™* _Ñ5×;Ñ;¸CÓ@ÐØˆó:ó4&r   