ok

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/xml/sax/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/xml/sax/__pycache__/xmlreader.cpython-311.opt-2.pyc

�

�f�1����	ddlmZddlmZmZGd�d��ZGd�de��ZGd�d��ZGd	�d
��ZGd�d��Z	Gd
�de	��Z
d�Zedkre��dSdS)�)�handler)�SAXNotSupportedException�SAXNotRecognizedExceptionc�j�eZdZ	d�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�ZdS)�	XMLReaderc���tj��|_tj��|_tj��|_tj��|_dS�N)	r�ContentHandler�
_cont_handler�
DTDHandler�_dtd_handler�EntityResolver�_ent_handler�ErrorHandler�_err_handler��selfs �8/opt/alt/python311/lib64/python3.11/xml/sax/xmlreader.py�__init__zXMLReader.__init__sL��$�3�5�5���#�.�0�0���#�2�4�4���#�0�2�2�����c�"�	td����Nz This method must be implemented!��NotImplementedError�r�sources  r�parsezXMLReader.parses��K�!�"D�E�E�Erc��	|jSr	�rrs r�getContentHandlerzXMLReader.getContentHandler"s��-��!�!rc��	||_dSr	r�rrs  r�setContentHandlerzXMLReader.setContentHandler&s��D�$����rc��	|jSr	�r
rs r�
getDTDHandlerzXMLReader.getDTDHandler*s��*�� � rc��	||_dSr	r%r"s  r�
setDTDHandlerzXMLReader.setDTDHandler.s��A�#����rc��	|jSr	�rrs r�getEntityResolverzXMLReader.getEntityResolver2s��-�� � rc��	||_dSr	r*)r�resolvers  r�setEntityResolverzXMLReader.setEntityResolver6s��:�$����rc��	|jSr	�rrs r�getErrorHandlerzXMLReader.getErrorHandler:s��+�� � rc��	||_dSr	r0r"s  r�setErrorHandlerzXMLReader.setErrorHandler>s��=�#����rc�"�	td���)NzLocale support not implemented)r)r�locales  r�	setLocalezXMLReader.setLocaleBs��	=�'�'G�H�H�Hrc�(�	td|z����NzFeature '%s' not recognized�r�r�names  r�
getFeaturezXMLReader.getFeatureKs��;�'�(E��(L�M�M�Mrc�(�	td|z���r8r9)rr;�states   r�
setFeaturezXMLReader.setFeatureOs��+�'�(E��(L�M�M�Mrc�(�	td|z����NzProperty '%s' not recognizedr9r:s  r�getPropertyzXMLReader.getPropertySs��<�'�(F��(M�N�N�Nrc�(�	td|z���rAr9)rr;�values   r�setPropertyzXMLReader.setPropertyWs��,�'�(F��(M�N�N�NrN)�__name__�
__module__�__qualname__rrr r#r&r(r+r.r1r3r6r<r?rBrE�rrrrs������
�3�3�3�F�F�F�"�"�"�%�%�%�!�!�!�$�$�$�!�!�!�%�%�%�!�!�!�$�$�$�I�I�I�N�N�N�N�N�N�O�O�O�O�O�O�O�Orrc�6�eZdZ	d	d�Zd�Zd�Zd�Zd�Zd�ZdS)
�IncrementalParser�c�H�||_t�|��dSr	)�_bufsizerr)r�bufsizes  rrzIncrementalParser.__init__os#����
����4� � � � � rc�|�ddlm}|�|��}|�|��|���}|�|���}|�|j��}|r1|�|��|�|j��}|�1|�	��dS)Nr)�saxutils)
�rQ�prepare_input_source�
prepareParser�getCharacterStream�
getByteStream�readrN�feed�close)rrrQ�file�buffers     rrzIncrementalParser.parsess����������.�.�v�6�6�����6�"�"�"��(�(�*�*���<��'�'�)�)�D����4�=�)�)���	.��I�I�f�����Y�Y�t�}�-�-�F��	.�	
�
�
�����rc�"�	td���rr)r�datas  rrXzIncrementalParser.feed�s��	(�"�"D�E�E�Erc�"�	td���)Nz!prepareParser must be overridden!rrs  rrTzIncrementalParser.prepareParser�s��	=�!�"E�F�F�Frc�"�	td���rrrs rrYzIncrementalParser.close�s��		)�"�"D�E�E�Erc�"�	td���rrrs r�resetzIncrementalParser.reset�s��	 �"�"D�E�E�ErN)rL)	rFrGrHrrrXrTrYrarIrrrKrK[s��������&!�!�!�!����F�F�F�G�G�G�
F�F�F�F�F�F�F�FrrKc�(�eZdZ	d�Zd�Zd�Zd�ZdS)�Locatorc��	dS�N���rIrs r�getColumnNumberzLocator.getColumnNumber�s
��@��rrc��	dSrerIrs r�
getLineNumberzLocator.getLineNumber�s
��>��rrc��	dSr	rIrs r�getPublicIdzLocator.getPublicId��
��=��trc��	dSr	rIrs r�getSystemIdzLocator.getSystemId�rlrN)rFrGrHrgrirkrnrIrrrcrc�sU������"�
�������������rrcc�T�eZdZ	d
d�Zd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
dS)�InputSourceNc�L�||_d|_d|_d|_d|_dSr	)�_InputSource__system_id�_InputSource__public_id�_InputSource__encoding�_InputSource__bytefile�_InputSource__charfile�r�	system_ids  rrzInputSource.__init__�s+��$����������������rc��	||_dSr	�rs)r�	public_ids  r�setPublicIdzInputSource.setPublicId����9�$����rc��	|jSr	rzrs rrkzInputSource.getPublicId����<���rc��	||_dSr	�rrrws  r�setSystemIdzInputSource.setSystemId�r}rc��	|jSr	r�rs rrnzInputSource.getSystemId�rrc��	||_dSr	�rt)r�encodings  r�setEncodingzInputSource.setEncoding�s��	9�#����rc��	|jSr	r�rs r�getEncodingzInputSource.getEncoding��
��9���rc��	||_dSr	�ru)r�bytefiles  r�
setByteStreamzInputSource.setByteStream�s��		A�#����rc��	|jSr	r�rs rrVzInputSource.getByteStream�s��	1���rc��	||_dSr	�rv)r�charfiles  r�setCharacterStreamzInputSource.setCharacterStreams��	0�#����rc��	|jSr	r�rs rrUzInputSource.getCharacterStreamr�rr	)rFrGrHrr|rkr�rnr�r�r�rVr�rUrIrrrprp�s�������
B� � � � �%�%�%� � � �%�%�%� � � �#�#�#����#�#�#����#�#�#�����rrpc�v�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zdd�Zd�Zd�Zd�ZdS)�AttributesImplc��	||_dSr	��_attrs)r�attrss  rrzAttributesImpl.__init__s��	7�����rc�*�t|j��Sr	��lenr�rs r�	getLengthzAttributesImpl.getLength����4�;���rc��dS)N�CDATArIr:s  r�getTypezAttributesImpl.getType!s���wrc��|j|Sr	r�r:s  r�getValuezAttributesImpl.getValue$����{�4� � rc��|j|Sr	r�r:s  r�getValueByQNamezAttributesImpl.getValueByQName'r�rc�6�||jvrt|���|Sr	�r��KeyErrorr:s  r�getNameByQNamezAttributesImpl.getNameByQName*� ���t�{�"�"��4�.�.� ��rc�6�||jvrt|���|Sr	r�r:s  r�getQNameByNamezAttributesImpl.getQNameByName/r�rc�N�t|j�����Sr	��listr��keysrs r�getNameszAttributesImpl.getNames4����D�K�$�$�&�&�'�'�'rc�N�t|j�����Sr	r�rs r�	getQNameszAttributesImpl.getQNames7r�rc�*�t|j��Sr	r�rs r�__len__zAttributesImpl.__len__:r�rc��|j|Sr	r�r:s  r�__getitem__zAttributesImpl.__getitem__=r�rc�N�t|j�����Sr	r�rs rr�zAttributesImpl.keys@r�rc��||jvSr	r�r:s  r�__contains__zAttributesImpl.__contains__Cs���t�{�"�"rNc�8�|j�||��Sr	)r��get)rr;�alternatives   rr�zAttributesImpl.getFs���{���t�[�1�1�1rc�6�|�|j��Sr	)�	__class__r�rs r�copyzAttributesImpl.copyIs���~�~�d�k�*�*�*rc�N�t|j�����Sr	)r�r��itemsrs rr�zAttributesImpl.itemsLs���D�K�%�%�'�'�(�(�(rc�N�t|j�����Sr	)r�r��valuesrs rr�zAttributesImpl.valuesOs���D�K�&�&�(�(�)�)�)rr	)rFrGrHrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rIrrr�r�s��������� � � ����!�!�!�!�!�!����
���
(�(�(�(�(�(� � � �!�!�!�(�(�(�#�#�#�2�2�2�2�+�+�+�)�)�)�*�*�*�*�*rr�c�2�eZdZd�Zd�Zd�Zd�Zd�Zd�ZdS)�AttributesNSImplc�$�	||_||_dSr	)r��_qnames)rr��qnamess   rrzAttributesNSImpl.__init__Vs��	=��������rc��|j���D]\}}||kr|j|cS�t|���r	)r�r�r�r��rr;�nsname�qnames    rr�z AttributesNSImpl.getValueByQName^sR��#�|�1�1�3�3�	+�	+�O�V�U���}�}��{�6�*�*�*�*���t�n�n�rc�r�|j���D]\}}||kr|cS�t|���r	)r�r�r�r�s    rr�zAttributesNSImpl.getNameByQNameesH��#�|�1�1�3�3�	�	�O�V�U���}�}��
�
�
���t�n�n�rc��|j|Sr	)r�r:s  rr�zAttributesNSImpl.getQNameByNamels���|�D�!�!rc�N�t|j�����Sr	)r�r�r�rs rr�zAttributesNSImpl.getQNamesos���D�L�'�'�)�)�*�*�*rc�B�|�|j|j��Sr	)r�r�r�rs rr�zAttributesNSImpl.copyrs���~�~�d�k�4�<�8�8�8rN)	rFrGrHrr�r�r�r�r�rIrrr�r�Tsn���������������"�"�"�+�+�+�9�9�9�9�9rr�c�Z�t��t��t��dSr	)rrKrcrIrr�_testr�vs$��
�K�K�K������I�I�I�I�Ir�__main__N)
rRr�_exceptionsrrrrKrcrpr�r�r�rFrIrr�<module>r�s���"�������L�L�L�L�L�L�L�L�
NO�NO�NO�NO�NO�NO�NO�NO�`FF�FF�FF�FF�FF�	�FF�FF�FF�T��������0U�U�U�U�U�U�U�U�r:*�:*�:*�:*�:*�:*�:*�:*�|9�9�9�9�9�~�9�9�9�D���
�z���	�E�G�G�G�G�G��r

Zerion Mini Shell 1.0