Your IP : 3.15.18.73


Current Path : /opt/alt/python310/lib64/python3.10/xml/sax/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/xml/sax/__pycache__/xmlreader.cpython-310.opt-2.pyc

o

6��f�1�@s�	ddlmZddlmZmZGdd�d�ZGdd�de�ZGdd�d�ZGd	d
�d
�ZGdd�d�Z	Gd
d�de	�Z
dd�ZedkrHe�dSdS)�)�handler)�SAXNotSupportedException�SAXNotRecognizedExceptionc@s�eZdZ	dd�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
�8/opt/alt/python310/lib64/python3.10/xml/sax/xmlreader.py�__init__s


zXMLReader.__init__cC�
	td���Nz This method must be implemented!��NotImplementedError�r�sourcer
r
r�parseszXMLReader.parsecC�	|jSr�rrr
r
r�getContentHandler"�zXMLReader.getContentHandlercC�	||_dSrr�rrr
r
r�setContentHandler&�
zXMLReader.setContentHandlercCrr�rrr
r
r�
getDTDHandler*rzXMLReader.getDTDHandlercCrrrrr
r
r�
setDTDHandler.rzXMLReader.setDTDHandlercCrr�r	rr
r
r�getEntityResolver2rzXMLReader.getEntityResolvercCrrr")rZresolverr
r
r�setEntityResolver6rzXMLReader.setEntityResolvercCrr�r
rr
r
r�getErrorHandler:rzXMLReader.getErrorHandlercCrrr%rr
r
r�setErrorHandler>rzXMLReader.setErrorHandlercCr)NzLocale support not implemented)r)r�localer
r
r�	setLocaleB�zXMLReader.setLocalecC�	td|���NzFeature '%s' not recognized�r�r�namer
r
r�
getFeatureK�zXMLReader.getFeaturecCr+r,r-)rr/�stater
r
r�
setFeatureOr1zXMLReader.setFeaturecCr+�NzProperty '%s' not recognizedr-r.r
r
r�getPropertySr1zXMLReader.getPropertycCr+r4r-)rr/�valuer
r
r�setPropertyWr1zXMLReader.setPropertyN)�__name__�
__module__�__qualname__rrrrr r!r#r$r&r'r)r0r3r5r7r
r
r
rrs"	rc@s@eZdZ	ddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�ZdS)�IncrementalParser�cCs||_t�|�dSr)�_bufsizerr)r�bufsizer
r
rroszIncrementalParser.__init__cCsnddlm}|�|�}|�|�|��}|dur|��}|�|j�}|r1|�|�|�|j�}|s$|�	�dS)Nr)�saxutils)
�r?Zprepare_input_source�
prepareParser�getCharacterStream�
getByteStream�readr=�feed�close)rrr?�file�bufferr
r
rrss


�zIncrementalParser.parsecCrrr)r�datar
r
rrE�r*zIncrementalParser.feedcCr)Nz!prepareParser must be overridden!rrr
r
rrA�szIncrementalParser.prepareParsercCrrrrr
r
rrF�s
zIncrementalParser.closecCrrrrr
r
r�reset�szIncrementalParser.resetN)r<)	r8r9r:rrrErArFrJr
r
r
rr;[s
	
r;c@s.eZdZ	dd�Zdd�Zdd�Zdd�Zd	S)
�LocatorcC�	dS�N���r
rr
r
r�getColumnNumber��zLocator.getColumnNumbercCrLrMr
rr
r
r�
getLineNumber�rPzLocator.getLineNumbercC�	dSrr
rr
r
r�getPublicId�rPzLocator.getPublicIdcCrRrr
rr
r
r�getSystemId�rPzLocator.getSystemIdN)r8r9r:rOrQrSrTr
r
r
rrK�srKc@sheZdZ	ddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�InputSourceNcCs"||_d|_d|_d|_d|_dSr)�_InputSource__system_id�_InputSource__public_id�_InputSource__encoding�_InputSource__bytefile�_InputSource__charfile�rZ	system_idr
r
rr�s

zInputSource.__init__cCrr�rW)rZ	public_idr
r
r�setPublicId�rzInputSource.setPublicIdcCrrr\rr
r
rrS�rzInputSource.getPublicIdcCrr�rVr[r
r
r�setSystemId�rzInputSource.setSystemIdcCrrr^rr
r
rrT�rzInputSource.getSystemIdcCrr�rX)r�encodingr
r
r�setEncoding��
zInputSource.setEncodingcCrrr`rr
r
r�getEncoding�rzInputSource.getEncodingcCrr�rY)rZbytefiler
r
r�
setByteStream�s

zInputSource.setByteStreamcCrrrerr
r
rrC�szInputSource.getByteStreamcCrr�rZ)rZcharfiler
r
r�setCharacterStreamrczInputSource.setCharacterStreamcCrrrgrr
r
rrBrzInputSource.getCharacterStreamr)r8r9r:rr]rSr_rTrbrdrfrCrhrBr
r
r
rrU�s



rUc@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)%�AttributesImplcCrr��_attrs)r�attrsr
r
rrs
zAttributesImpl.__init__cC�
t|j�Sr��lenrkrr
r
r�	getLength�
zAttributesImpl.getLengthcCsdS)NZCDATAr
r.r
r
r�getType!szAttributesImpl.getTypecC�
|j|Srrjr.r
r
r�getValue$rqzAttributesImpl.getValuecCrsrrjr.r
r
r�getValueByQName'rqzAttributesImpl.getValueByQNamecC�||jvr	t|��|Sr�rk�KeyErrorr.r
r
r�getNameByQName*�
zAttributesImpl.getNameByQNamecCrvrrwr.r
r
r�getQNameByName/rzzAttributesImpl.getQNameByNamecC�t|j���Sr��listrk�keysrr
r
r�getNames4�zAttributesImpl.getNamescCr|rr}rr
r
r�	getQNames7r�zAttributesImpl.getQNamescCrmrrnrr
r
r�__len__:rqzAttributesImpl.__len__cCrsrrjr.r
r
r�__getitem__=rqzAttributesImpl.__getitem__cCr|rr}rr
r
rr@r�zAttributesImpl.keyscCs
||jvSrrjr.r
r
r�__contains__CrqzAttributesImpl.__contains__NcCs|j�||�Sr)rk�get)rr/Zalternativer
r
rr�Fr�zAttributesImpl.getcCs|�|j�Sr)�	__class__rkrr
r
r�copyIszAttributesImpl.copycCr|r)r~rk�itemsrr
r
rr�Lr�zAttributesImpl.itemscCr|r)r~rk�valuesrr
r
rr�Or�zAttributesImpl.valuesr)r8r9r:rrprrrtruryr{r�r�r�r�rr�r�r�r�r�r
r
r
rris$
ric@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�AttributesNSImplcCs	||_||_dSr)rk�_qnames)rrlZqnamesr
r
rrVs
zAttributesNSImpl.__init__cCs2|j��D]\}}||kr|j|Sqt|��r)r�r�rkrx�rr/ZnsnameZqnamer
r
rru^s
�z AttributesNSImpl.getValueByQNamecCs,|j��D]\}}||kr|Sqt|��r)r�r�rxr�r
r
rryes
�zAttributesNSImpl.getNameByQNamecCrsr)r�r.r
r
rr{lrqzAttributesNSImpl.getQNameByNamecCr|r)r~r�r�rr
r
rr�or�zAttributesNSImpl.getQNamescCs|�|j|j�Sr)r�rkr�rr
r
rr�rszAttributesNSImpl.copyN)	r8r9r:rruryr{r�r�r
r
r
rr�Tsr�cCst�t�t�dSr)rr;rKr
r
r
r�_testvs
r��__main__N)
r@r�_exceptionsrrrr;rKrUrir�r�r8r
r
r
r�<module>sPJY>"
�

?>