ok

Mini Shell

Direktori : /opt/alt/python35/lib64/python3.5/xml/sax/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/xml/sax/__pycache__/xmlreader.cpython-35.opt-2.pyc



���]�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@tj�|_tj�|_tj�|_tj�|_dS)N)	rZContentHandler�
_cont_handlerZ
DTDHandler�_dtd_handlerZEntityResolver�_ent_handlerZErrorHandler�_err_handler)�self�r�./opt/alt/python35/lib64/python3.5/xmlreader.py�__init__szXMLReader.__init__cCstd��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.setErrorHandlercCstd��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�Zd	d
�Zdd�Zd
d�ZdS)�IncrementalParser��cCs||_tj|�dS)N)�_bufsizerr
)r
�bufsizerrrr
os	zIncrementalParser.__init__cCs�ddlm}|j|�}|j|�|j�}|dkrP|j�}|j|j�}x)|r�|j|�|j|j�}qeW|j	�dS)Nr)�saxutils)
�r*Zprepare_input_source�
prepareParser�getCharacterStream�
getByteStream�readr(�feed�close)r
rr*�file�bufferrrrrss
	
zIncrementalParser.parsecCstd��dS)Nz This method must be implemented!)r)r
�datarrrr0�szIncrementalParser.feedcCstd��dS)Nz!prepareParser must be overridden!)r)r
rrrrr,�szIncrementalParser.prepareParsercCstd��dS)Nz This method must be implemented!)r)r
rrrr1�szIncrementalParser.closecCstd��dS)Nz This method must be implemented!)r)r
rrr�reset�szIncrementalParser.resetNi)	r"r#r$r
rr0r,r1r5rrrrr%[s	
r%c@s@eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�LocatorcCsdS)Nr���r)r
rrr�getColumnNumber�szLocator.getColumnNumbercCsdS)Nrr7r)r
rrr�
getLineNumber�szLocator.getLineNumbercCsdS)Nr)r
rrr�getPublicId�szLocator.getPublicIdcCsdS)Nr)r
rrr�getSystemId�szLocator.getSystemIdN)r"r#r$r8r9r:r;rrrrr6�sr6c@s�eZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�InputSourceNcCs1||_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r:�szInputSource.getPublicIdcCs
||_dS)N)r=)r
rBrrr�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)rA)r
Zcharfilerrr�setCharacterStreamszInputSource.setCharacterStreamcCs|jS)N)rA)r
rrrr-szInputSource.getCharacterStream)r"r#r$r
rCr:rDr;rFrGrHr.rIr-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�Zddd�Zdd�Zd d!�Zd"d#�ZdS)$�AttributesImplcCs
||_dS)N)�_attrs)r
�attrsrrrr
szAttributesImpl.__init__cCs
t|j�S)N)�lenrK)r
rrr�	getLengthszAttributesImpl.getLengthcCsdS)NZCDATAr)r
rrrr�getType!szAttributesImpl.getTypecCs|j|S)N)rK)r
rrrr�getValue$szAttributesImpl.getValuecCs|j|S)N)rK)r
rrrr�getValueByQName'szAttributesImpl.getValueByQNamecCs||jkrt|��|S)N)rK�KeyError)r
rrrr�getNameByQName*szAttributesImpl.getNameByQNamecCs||jkrt|��|S)N)rKrR)r
rrrr�getQNameByName/szAttributesImpl.getQNameByNamecCst|jj��S)N)�listrK�keys)r
rrr�getNames4szAttributesImpl.getNamescCst|jj��S)N)rUrKrV)r
rrr�	getQNames7szAttributesImpl.getQNamescCs
t|j�S)N)rMrK)r
rrr�__len__:szAttributesImpl.__len__cCs|j|S)N)rK)r
rrrr�__getitem__=szAttributesImpl.__getitem__cCst|jj��S)N)rUrKrV)r
rrrrV@szAttributesImpl.keyscCs
||jkS)N)rK)r
rrrr�__contains__CszAttributesImpl.__contains__NcCs|jj||�S)N)rK�get)r
rZalternativerrrr\FszAttributesImpl.getcCs|j|j�S)N)�	__class__rK)r
rrr�copyIszAttributesImpl.copycCst|jj��S)N)rUrK�items)r
rrrr_LszAttributesImpl.itemscCst|jj��S)N)rUrK�values)r
rrrr`OszAttributesImpl.values)r"r#r$r
rNrOrPrQrSrTrWrXrYrZrVr[r\r^r_r`rrrrrJs"rJc@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�AttributesNSImplcCs||_||_dS)N)rK�_qnames)r
rLZqnamesrrrr
Vs	zAttributesNSImpl.__init__cCsGx4|jj�D]#\}}||kr|j|SqWt|��dS)N)rbr_rKrR)r
r�nsname�qnamerrrrQ^sz AttributesNSImpl.getValueByQNamecCs@x-|jj�D]\}}||kr|SqWt|��dS)N)rbr_rR)r
rrcrdrrrrSeszAttributesNSImpl.getNameByQNamecCs|j|S)N)rb)r
rrrrrTlszAttributesNSImpl.getQNameByNamecCst|jj��S)N)rUrbr`)r
rrrrXoszAttributesNSImpl.getQNamescCs|j|j|j�S)N)r]rKrb)r
rrrr^rszAttributesNSImpl.copyN)	r"r#r$r
rQrSrTrXr^rrrrraTsracCst�t�t�dS)N)rr%r6rrrr�_testvsre�__main__N)
r+r�_exceptionsrrrr%r6r<rJrarer"rrrr�<module>sPJY>"

Zerion Mini Shell 1.0