Your IP : 3.145.156.17


Current Path : /lib64/python3.8/xml/etree/__pycache__/
Upload File :
Current File : //lib64/python3.8/xml/etree/__pycache__/ElementInclude.cpython-38.opt-2.pyc

U

e5d�@sPddlZddlmZdZedZedZGdd�de�Zdd	d
�Zd
dd�Z	dS)�N�)�ElementTreez!{http://www.w3.org/2001/XInclude}�includeZfallbackc@seZdZdS)�FatalIncludeErrorN)�__name__�
__module__�__qualname__�r	r	�0/usr/lib64/python3.8/xml/etree/ElementInclude.pyr>src	Cs\|dkr.t|d��}t�|���}W5QRXn*|s6d}t|d|d��}|��}W5QRX|S)N�xml�rbzUTF-8�r)�encoding)�openr�parseZgetroot�read)�hrefrr�file�datar	r	r
�default_loaderMsrcCsh|dkrt}d}|t|�k�rd||}|jtk�r4|�d�}|�dd�}|dkr�|||�}|dkrrtd||f��t�|�}|jr�|jp�d|j|_|||<n�|dk�r&||||�d��}|dkr�td||f��|r�||d	}|jp�d||jp�d|_n|j�pd||j�pd|_||=qntd
|��n&|jt	k�rPtd|j��n
t
||�|d	}qdS)Nrrrrzcannot load %r as %r��textrrz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r))r�len�tag�XINCLUDE_INCLUDE�getr�copy�tailr�XINCLUDE_FALLBACKr)�elem�loader�i�errZnoderr	r	r
rcsN


�



���
)N)N)
rrrZXINCLUDErr�SyntaxErrorrrrr	r	r	r
�<module>3s


?>