ok

Mini Shell

Direktori : /lib64/python3.6/xml/sax/__pycache__/
Upload File :
Current File : //lib64/python3.6/xml/sax/__pycache__/xmlreader.cpython-36.opt-2.pyc

3


 \�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�)/usr/lib64/python3.6/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
Zlocalerrr�	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
oszIncrementalParser.__init__cCspddlm}|j|�}|j|�|j�}|dkr8|j�}|j|j�}x|rb|j|�|j|j�}qFW|j	�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�)r5)	r!r"r#r
rr/r+r0r4rrrr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�sr6c@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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)N)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�Zd$dd�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)N)r!r"r#r
rNrOrPrQrSrTrWrXrYrZrVr[r\r^r_r`rrrrrJs"
rJc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�AttributesNSImplcCs||_||_dS)N)rK�_qnames)r
rLZqnamesrrrr
VszAttributesNSImpl.__init__cCs6x(|jj�D]\}}||kr|j|SqWt|��dS)N)rbr_rKrR)r
r�nsname�qnamerrrrQ^sz AttributesNSImpl.getValueByQNamecCs0x"|jj�D]\}}||kr|SqWt|��dS)N)rbr_rR)r
rrcrdrrrrSeszAttributesNSImpl.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>sPJY>"

Zerion Mini Shell 1.0