Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib64/python3.7/xml/sax/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/xml/sax/__pycache__/xmlreader.cpython-37.opt-2.pyc

B

YI~d�1�@s�ddlmZddlmZmZGdd�d�ZGdd�de�ZGdd�d�ZGd	d
�d
�ZGdd�d�Z	Gd
d�de	�Z
dd�Zedkr�e�dS)�)�handler)�SAXNotSupportedException�SAXNotRecognizedExceptionc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�ZdS) �	XMLReadercCs,t��|_t��|_t��|_t��|_dS)N)	rZContentHandler�
_cont_handlerZ
DTDHandler�_dtd_handlerZEntityResolver�_ent_handlerZErrorHandler�_err_handler)�self�r�6/opt/alt/python37/lib64/python3.7/xml/sax/xmlreader.py�__init__s


zXMLReader.__init__cCstd��dS)Nz This method must be implemented!)�NotImplementedError)r
�sourcerrr�parseszXMLReader.parsecCs|jS)N)r)r
rrr�getContentHandler"szXMLReader.getContentHandlercCs
||_dS)N)r)r
rrrr�setContentHandler&szXMLReader.setContentHandlercCs|jS)N)r)r
rrr�
getDTDHandler*szXMLReader.getDTDHandlercCs
||_dS)N)r)r
rrrr�
setDTDHandler.szXMLReader.setDTDHandlercCs|jS)N)r)r
rrr�getEntityResolver2szXMLReader.getEntityResolvercCs
||_dS)N)r)r
Zresolverrrr�setEntityResolver6szXMLReader.setEntityResolvercCs|jS)N)r	)r
rrr�getErrorHandler:szXMLReader.getErrorHandlercCs
||_dS)N)r	)r
rrrr�setErrorHandler>szXMLReader.setErrorHandlercCstd��dS)NzLocale support not implemented)r)r
�localerrr�	setLocaleBszXMLReader.setLocalecCstd|��dS)NzFeature '%s' not recognized)r)r
�namerrr�
getFeatureKszXMLReader.getFeaturecCstd|��dS)NzFeature '%s' not recognized)r)r
r�staterrr�
setFeatureOszXMLReader.setFeaturecCstd|��dS)NzProperty '%s' not recognized)r)r
rrrr�getPropertySszXMLReader.getPropertycCstd|��dS)NzProperty '%s' not recognized)r)r
r�valuerrr�setPropertyWszXMLReader.setPropertyN)�__name__�
__module__�__qualname__r
rrrrrrrrrrrrrr!rrrrrs
	rc@s>eZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�ZdS)�IncrementalParser�cCs||_t�|�dS)N)�_bufsizerr
)r
�bufsizerrrr
oszIncrementalParser.__init__cCspddlm}|�|�}|�|�|��}|dkr8|��}|�|j�}x|rb|�|�|�|j�}qFW|�	�dS)Nr)�saxutils)
�r)Zprepare_input_source�
prepareParser�getCharacterStream�
getByteStream�readr'�feed�close)r
rr)�file�bufferrrrrss


zIncrementalParser.parsecCstd��dS)Nz This method must be implemented!)r)r
�datarrrr/�szIncrementalParser.feedcCstd��dS)Nz!prepareParser must be overridden!)r)r
rrrrr+�szIncrementalParser.prepareParsercCstd��dS)Nz This method must be implemented!)r)r
rrrr0�szIncrementalParser.closecCstd��dS)Nz This method must be implemented!)r)r
rrr�reset�szIncrementalParser.resetN)r&)	r"r#r$r
rr/r+r0r4rrrrr%[s
	
r%c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�LocatorcCsdS)N���r)r
rrr�getColumnNumber�szLocator.getColumnNumbercCsdS)Nr6r)r
rrr�
getLineNumber�szLocator.getLineNumbercCsdS)Nr)r
rrr�getPublicId�szLocator.getPublicIdcCsdS)Nr)r
rrr�getSystemId�szLocator.getSystemIdN)r"r#r$r7r8r9r:rrrrr5�sr5c@sfeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�InputSourceNcCs"||_d|_d|_d|_d|_dS)N)�_InputSource__system_id�_InputSource__public_id�_InputSource__encoding�_InputSource__bytefile�_InputSource__charfile)r
�	system_idrrrr
�s
zInputSource.__init__cCs
||_dS)N)r=)r
Z	public_idrrr�setPublicId�szInputSource.setPublicIdcCs|jS)N)r=)r
rrrr9�szInputSource.getPublicIdcCs
||_dS)N)r<)r
rArrr�setSystemId�szInputSource.setSystemIdcCs|jS)N)r<)r
rrrr:�szInputSource.getSystemIdcCs
||_dS)N)r>)r
�encodingrrr�setEncoding�szInputSource.setEncodingcCs|jS)N)r>)r
rrr�getEncoding�szInputSource.getEncodingcCs
||_dS)N)r?)r
Zbytefilerrr�
setByteStream�szInputSource.setByteStreamcCs|jS)N)r?)r
rrrr-�szInputSource.getByteStreamcCs
||_dS)N)r@)r
Zcharfilerrr�setCharacterStreamszInputSource.setCharacterStreamcCs|jS)N)r@)r
rrrr,szInputSource.getCharacterStream)N)r"r#r$r
rBr9rCr:rErFrGr-rHr,rrrrr;�s



r;c@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zd$dd�Zdd�Zd d!�Zd"d#�ZdS)%�AttributesImplcCs
||_dS)N)�_attrs)r
�attrsrrrr
szAttributesImpl.__init__cCs
t|j�S)N)�lenrJ)r
rrr�	getLengthszAttributesImpl.getLengthcCsdS)NZCDATAr)r
rrrr�getType!szAttributesImpl.getTypecCs
|j|S)N)rJ)r
rrrr�getValue$szAttributesImpl.getValuecCs
|j|S)N)rJ)r
rrrr�getValueByQName'szAttributesImpl.getValueByQNamecCs||jkrt|��|S)N)rJ�KeyError)r
rrrr�getNameByQName*s
zAttributesImpl.getNameByQNamecCs||jkrt|��|S)N)rJrQ)r
rrrr�getQNameByName/s
zAttributesImpl.getQNameByNamecCst|j���S)N)�listrJ�keys)r
rrr�getNames4szAttributesImpl.getNamescCst|j���S)N)rTrJrU)r
rrr�	getQNames7szAttributesImpl.getQNamescCs
t|j�S)N)rLrJ)r
rrr�__len__:szAttributesImpl.__len__cCs
|j|S)N)rJ)r
rrrr�__getitem__=szAttributesImpl.__getitem__cCst|j���S)N)rTrJrU)r
rrrrU@szAttributesImpl.keyscCs
||jkS)N)rJ)r
rrrr�__contains__CszAttributesImpl.__contains__NcCs|j�||�S)N)rJ�get)r
rZalternativerrrr[FszAttributesImpl.getcCs|�|j�S)N)�	__class__rJ)r
rrr�copyIszAttributesImpl.copycCst|j���S)N)rTrJ�items)r
rrrr^LszAttributesImpl.itemscCst|j���S)N)rTrJ�values)r
rrrr_OszAttributesImpl.values)N)r"r#r$r
rMrNrOrPrRrSrVrWrXrYrUrZr[r]r^r_rrrrrIs"
rIc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�AttributesNSImplcCs||_||_dS)N)rJ�_qnames)r
rKZqnamesrrrr
VszAttributesNSImpl.__init__cCs6x(|j��D]\}}||kr|j|SqWt|��dS)N)rar^rJrQ)r
r�nsname�qnamerrrrP^sz AttributesNSImpl.getValueByQNamecCs0x"|j��D]\}}||kr|SqWt|��dS)N)rar^rQ)r
rrbrcrrrrReszAttributesNSImpl.getNameByQNamecCs
|j|S)N)ra)r
rrrrrSlszAttributesNSImpl.getQNameByNamecCst|j���S)N)rTrar_)r
rrrrWoszAttributesNSImpl.getQNamescCs|�|j|j�S)N)r\rJra)r
rrrr]rszAttributesNSImpl.copyN)	r"r#r$r
rPrRrSrWr]rrrrr`Tsr`cCst�t�t�dS)N)rr%r5rrrr�_testvsrd�__main__N)
r*r�_exceptionsrrrr%r5r;rIr`rdr"rrrr�<module>sPJY>"

Hacked By AnonymousFox1.0, Coded By AnonymousFox