Your IP : 18.191.223.30
U
i�f? � @ s d dl mZ d dlmZmZ d dlmZmZmZm Z m
Z
e� fdd�Ze� fdd�ZdgZ
d Zerjd d
lZd d
lZd d
lZejjs�dejkr�ejd �d�Z
[d
Zejd
d� dkr�ej�e�r�ej�e��d�Z
ddd�Zejd
d� dkr�dd� Zndd� Z[d
S )� )�InputSource)�ContentHandler�ErrorHandler)�SAXException�SAXNotRecognizedException�SAXParseException�SAXNotSupportedException�SAXReaderNotAvailablec C s( t � }|�|� |�|� |�| � d S )N)�make_parser�setContentHandler�setErrorHandler�parse)�source�handler�errorHandler�parser� r �5/opt/alt/python38/lib64/python3.8/xml/sax/__init__.pyr
s
r
c C sp dd l }|d krt� }t� }|�|� |�|� t� }t| t�rR|�|� | �� n|�
|�| �� |�|� d S )N� )
�ior r
r r r �
isinstance�strZsetCharacterStream�StringIOZ
setByteStream�BytesIOr
)�stringr r r r Zinpsrcr r r �parseString# s
r zxml.sax.expatreaderr NZ
PY_SAX_PARSER�,zpython.xml.sax.parser� �javar c C sx t | �t D ]\}zt|�W S tk
rT } zdd l}||jkrD� W 5 d }~X Y q tk
rf Y qX qtdd ��d S )Nr zNo parsers found)�list�default_parser_list�_create_parser�ImportError�sys�modulesr )Zparser_list�parser_name�er# r r r r
F s
r
c C s$ ddl m} |�| dt� �}|�� S )Nr )�imp)Zorg.python.corer'