Your IP : 18.224.32.243
3
\. � @ s
d dl mZ d dlmZmZ d dlmZmZmZm Z m
Z
e� fdd�Ze� fdd�ZdgZ
d Zerjd d
lZd d
lZd d
lZejj r�dejkr�ejd jd�Z
[d
Zejd
d� dkr�ejje�r�ejje�jd�Z
g fdd�Zejd
d� dkr�dd� Zndd� Z[d
S )� )�InputSource)�ContentHandler�ErrorHandler)�SAXException�SAXNotRecognizedException�SAXParseException�SAXNotSupportedException�SAXReaderNotAvailablec C s( t � }|j|� |j|� |j| � d S )N)�make_parser�setContentHandler�setErrorHandler�parse)�source�handler�errorHandler�parser� r �(/usr/lib64/python3.6/xml/sax/__init__.pyr
s
r
c C sp dd l }|d krt� }t� }|j|� |j|� t� }t| t�rR|j|j | �� n|j
|j| �� |j|� 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� �javac C sr xb| t D ]V}yt|�S tk
rL } zdd l}||jkr<� W Y d d }~X q
tk
r^ Y q
X q
W tdd ��d S )Nr zNo parsers found)�default_parser_list�_create_parser�ImportError�sys�modulesr )Zparser_list�parser_name�er"