AlkantarClanX12

Your IP : 3.144.235.138


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

�

c��fS?���	dZddlTddlmZmZddlmZddlmZmZddlmZddlm	Z	m
Z
ddlZejdd	�d
kre
dd���[	ddlmZeed
��se
dd���n#e$r
e
dd���wxYwddlmZmZmZejZejZ	ddlZddlZejZ[[n#e$rd�ZYnwxYwGd�d��ZGd�dej��ZGd�dejej��Z d�Z!e"dkr�ddl#Z$e!��Z%e%�&e$j'j�(����e%�)e$j'�*����e%�+d��dSdS)z0.20�)�*)�feature_validation�feature_namespaces)�feature_namespace_prefixes)�feature_external_ges�feature_external_pes)�feature_string_interning)�property_xml_string�property_interning_dictN��javazexpat not available in Java)�expat�ParserCreatezexpat not supported)�	xmlreader�saxutils�handlerc��|S�N�)�os �:/opt/alt/python311/lib64/python3.11/xml/sax/expatreader.py�_mkproxyr's����c��eZdZdS)�
_ClosedParserN)�__name__�
__module__�__qualname__rrrrr.s�������Drrc�.�eZdZ	d�Zd�Zd�Zd�Zd�ZdS)�ExpatLocatorc�.�t|��|_dSr)r�_ref��self�parsers  r�__init__zExpatLocator.__init__9s���V�$�$��	�	�	rc�:�|j}|j�dS|jjSr)r"�_parser�ErrorColumnNumberr#s  r�getColumnNumberzExpatLocator.getColumnNumber<s!������>�!��4��~�/�/rc�:�|j}|j�dS|jjS�N�)r"r(�ErrorLineNumberr#s  r�
getLineNumberzExpatLocator.getLineNumberBs!������>�!��1��~�-�-rc�J�|j}|�dS|j���Sr)r"�_source�getPublicIdr#s  rr2zExpatLocator.getPublicIdH�'������>��4��~�)�)�+�+�+rc�J�|j}|�dS|j���Sr)r"r1�getSystemIdr#s  rr5zExpatLocator.getSystemIdNr3rN)rrrr&r*r/r2r5rrrr r 3sd�������
%�%�%�0�0�0�.�.�.�,�,�,�,�,�,�,�,rr c���eZdZ	d%d�Zd�Zd�Zd�Zd�Zd�Zd	�Z	d
�Z
d&d�Zd
�Zd�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd �Zd!�Z d"�Z!d#�Z"d$S)'�ExpatParserr��c���tj�||��tj��|_d|_||_d|_d|_g|_	d|_
d|_dS)NFr)r�IncrementalParserr&�InputSourcer1r(�_namespaces�_lex_handler_prop�_parsing�
_entity_stack�
_external_ges�
_interning)r$�namespaceHandling�bufsizes   rr&zExpatParser.__init__Zsd���#�,�,�T�7�;�;�;� �,�.�.������,���!%�����
�����������rc�*�	tj|��}||_	|���|j�t
|����tj�	||��dS#|�
���xYwr)r�prepare_input_sourcer1�reset�
_cont_handler�setDocumentLocatorr rr:�parse�
_close_source�r$�sources  rrIzExpatParser.parsegs���=��.�v�6�6�����		��J�J�L�L�L���1�1�,�t�2D�2D�E�E�E��'�-�-�d�F�;�;�;�;�;��	�
��� � � ����s�AA;�;Bc��|����.|j�|�����dSdSr)r5r(�SetBaserKs  r�
prepareParserzExpatParser.prepareParserwsD�������+��L� � ��!3�!3�!5�!5�6�6�6�6�6�,�+rc��tj�||��|jr|���dSdSr)rr:�setContentHandlerr>�_reset_cont_handler)r$rs  rrQzExpatParser.setContentHandler}sG���#�5�5�d�G�D�D�D��=�	'��$�$�&�&�&�&�&�	'�	'rc���|tkr|jS|tkr	|jduS|tt
tfvrdS|tkr|jStd|z���)Nr�Feature '%s' not recognized)
rr<r	rArrrrr@�SAXNotRecognizedException�r$�names  r�
getFeaturezExpatParser.getFeature�sy���%�%�%��#�#�
�-�
-�
-��?�$�.�.�
�(�*>�0�2�2�2��1�
�)�
)�
)��%�%�'�(E��(L�M�M�Mrc��|jrtd���|tkr	||_dS|tkr	||_dS|tkr|r|j�	i|_dSdSd|_dS|tkr|rtd���dS|tkr|rtd���dS|tkr|rtd���dStd|z���)Nz!Cannot set features while parsingz!expat does not support validationz/expat does not read external parameter entitiesz(expat does not report namespace prefixesrT)r>�SAXNotSupportedExceptionrr<rr@r	rArrrrU)r$rW�states   r�
setFeaturezExpatParser.setFeature�sQ���=�	P�*�+N�O�O�O��%�%�%�$�D����
�)�
)�
)�!&�D����
�-�
-�
-��
'��?�*�&(�D�O�O�O�+�*�#'�����
�'�
'�
'��
9�.�7�9�9�9�
9�
9��)�
)�
)��
G�.�E�G�G�G�
G�
G��/�
/�
/��
@�.�>�@�@�@�
@�
@�,�-��4�6�6�
6rc�4�|tjkr|jS|tkr|jS|t
krS|jr=t|jd��r|j���Std���td���td|z���)N�GetInputContextz=This version of expat does not support getting the XML stringz.XML string cannot be returned when not parsing�Property '%s' not recognized)r�property_lexical_handlerr=rrAr
r(�hasattrr^rUrZrVs  r�getPropertyzExpatParser.getProperty�s����7�3�3�3��)�)�
�,�
,�
,��?�"�
�(�
(�
(��|�	
F��4�<�):�;�;�+��<�7�7�9�9�9�3�*�+�+�+�/�D�F�F�F�'�(F��(M�N�N�Nrc���|tjkr&||_|jr|���dSdS|t
kr	||_dS|tkrtd|z���td|z���)NzProperty '%s' cannot be setr_)
rr`r=r>�_reset_lex_handler_proprrAr
rZrU)r$rW�values   r�setPropertyzExpatParser.setProperty�s����7�3�3�3�%*�D�"��}�
/��,�,�.�.�.�.�.�
/�
/�
�,�
,�
,�#�D�O�O�O�
�(�
(�
(�*�+H�+/�,0�1�1�
1�,�,J�,0�-1�2�2�
2rFc�r�|js4|���d|_|j���	|j�||��dS#tj$rM}tt
j	|j
��||��}|j�|��Yd}~dSd}~wwxYw)NT)
r>rFrG�
startDocumentr(�Parser�error�SAXParseException�ErrorString�code�_err_handler�
fatalError)r$�data�isFinal�e�excs     r�feedzExpatParser.feed�s����}�	/��J�J�L�L�L� �D�M���,�,�.�.�.�		.�

�L���t�W�-�-�-�-�-���{�	.�	.�	.�#�E�$5�a�f�$=�$=�q�$�G�G�C���(�(��-�-�-�-�-�-�-�-�-�����	.���s�A�B6�)AB1�1B6c���|j�dS|j���}	|j�d��|j�dd��n^#tj$rL}t
t	j|j��||��}|j	�
|��Yd}~nd}~wwxYw|j�|��dS#|j�|��wxYw)NFr)r(�GetReparseDeferralEnabled�SetReparseDeferralEnabledrirrjrkrlrmrnro)r$�was_enabledrrrss    r�flushzExpatParser.flush�s����<���F��l�<�<�>�>��	@��L�2�2�5�9�9�9��L���s�E�*�*�*�*���{�	.�	.�	.�#�E�$5�a�f�$=�$=�q�$�G�G�C���(�(��-�-�-�-�-�-�-�-�����	.����
�L�2�2�;�?�?�?�?�?��D�L�2�2�;�?�?�?�?���s0�5A�C�B5�)AB0�+C�0B5�5C�C0c�"�|j}	|���}|�|���|���}|�|���dSdS#|���}|�|���wwxYwr)r1�getCharacterStream�close�
getByteStream)r$rL�files   rrJzExpatParser._close_source�s������	��,�,�.�.�D����
�
�����'�'�)�)�D����
�
������ ����'�'�)�)�D����
�
����� ���s�*A!�!-Bc�F�|js!|j�t|jt��rdS	|�dd���|j���d|_d|_d|_|j�7t��}|jj|_|jj	|_	||_|�
��dS#d|_|j�7t��}|jj|_|jj	|_	||_|�
��wxYw)NrT)rqF)r?r(�
isinstancerrtrG�endDocumentr>r)r.rJr#s  rr|zExpatParser.close�s����	�$�,�"6��t�|�]�3�3�#7�
�F�	!��I�I�c�4�I�(�(�(���*�*�,�,�,�!�D�M��D�L�!�D�M��|�'�&����+/�<�+I��(�)-��)E��&�%������ � � � � ��"�D�M��|�'�&����+/�<�+I��(�)-��)E��&�%������ � � � ���s�>C�AD c�^�|jj|j_|jj|j_dSr)rG�processingInstructionr(�ProcessingInstructionHandler�
characters�CharacterDataHandler�r$s rrRzExpatParser._reset_cont_handler
s+��$(�$6�$L�	
��1�,0�,>�,I���)�)�)rc���|j}|j}|�%d|_d|_d|_d|_d|_dS|j|_|j|_|j	|_|j
|_|j|_dSr)r=r(�CommentHandler�StartCdataSectionHandler�EndCdataSectionHandler�StartDoctypeDeclHandler�EndDoctypeDeclHandler�comment�
startCDATA�endCDATA�start_doctype_decl�endDTD)r$�lexr%s   rrdz#ExpatParser._reset_lex_handler_props}���$������;�$(�F�!�.2�F�+�,0�F�)�-1�F�*�+/�F�(�(�(�$'�K�F�!�.1�n�F�+�,/�L�F�)�-1�-D�F�*�+.�:�F�(�(�(rc�T�|jrgtj|j���d|j���|_d|j_|j|j_	|j
|j_nYtj|j���|j���|_|j|j_	|j
|j_|���|j|j_|j|j_|j|j_|j|j_d|_|jr|���|j|j_	|j|j_n#t<$rYnwxYw|j�tj ��d|_!g|_"dS)N� )�internr-F)#r<rrr1�getEncodingrAr(�namespace_prefixes�start_element_ns�StartElementHandler�end_element_ns�EndElementHandler�
start_element�end_elementrR�unparsed_entity_decl�UnparsedEntityDeclHandler�
notation_decl�NotationDeclHandler�start_namespace_decl�StartNamespaceDeclHandler�end_namespace_decl�EndNamespaceDeclHandler�_decl_handler_propr=rd�external_entity_ref�ExternalEntityRefHandler�skipped_entity_handler�SkippedEntityHandler�AttributeError�SetParamEntityParsing�*XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONEr>r?r�s rrFzExpatParser.reset"s�����
	>� �-�d�l�.F�.F�.H�.H�#�59�_�F�F�F�D�L�./�D�L�+�/3�/D�D�L�,�-1�-@�D�L�*�*� �-�d�l�.F�.F�.H�.H�7;��H�H�H�D�L�/3�/A�D�L�,�-1�-=�D�L�*�� � �"�"�"�15�1J���.�+/�+=���(�15�1J���.�/3�/F���,�"&����!�	+��(�(�*�*�*�15�0H���-�	�04�0K�D�L�-�-���	�	�	��D�	����	
��*�*��<�	>�	>�	>���
�����s�E&�&
E3�2E3c�,�|j�dS|jjSr)r(r)r�s rr*zExpatParser.getColumnNumberIs���<���4��|�-�-rc�,�|j�dS|jjSr,)r(r.r�s rr/zExpatParser.getLineNumberNs���<���1��|�+�+rc�4�|j���Sr)r1r2r�s rr2zExpatParser.getPublicIdS����|�'�'�)�)�)rc�4�|j���Sr)r1r5r�s rr5zExpatParser.getSystemIdVr�rc�V�|j�|t|����dSr)rG�startElement�AttributesImpl)r$rW�attrss   rr�zExpatParser.start_elementZs)����'�'��n�U�.C�.C�D�D�D�D�Drc�:�|j�|��dSr)rG�
endElementrVs  rr�zExpatParser.end_element]�����%�%�d�+�+�+�+�+rc�J�|���}t|��dkrd|f}n3t|��dkr|d|df}nt|��}i}i}|���D]�\}}|���}t|��}	|	dkr|}
d|f}nA|	dkr$|d�d|d��}
|d|df}n|d}
t|��}|||<|
||<��|j�|dt
||����dS)Nr-�r��:)�split�len�tuple�itemsrG�startElementNS�AttributesNSImpl)r$rWr��pair�newattrs�qnames�anamere�parts�length�qname�apairs            rr�zExpatParser.start_element_ns`sI���z�z�|�|���t�9�9��>�>��$�<�D�D�
��Y�Y�!�^�^���7�D��G�#�D�D���;�;�D�����#�k�k�m�m�	"�	"�N�U�E��K�K�M�M�E���Z�Z�F���{�{����u�
����1���#(��8�8�8�U�1�X�X�6���a��%��(�*����a����e����#�H�U�O�!�F�5�M�M���)�)�$��*:�8�V�*L�*L�	N�	N�	N�	N�	Nrc��|���}t|��dkrd|f}n3t|��dkr|d|df}nt|��}|j�|d��dS)Nr-r�r)r�r�r�rG�endElementNS)r$rWr�s   rr�zExpatParser.end_element_ns�sv���z�z�|�|���t�9�9��>�>��$�<�D�D�
��Y�Y�!�^�^���7�D��G�#�D�D���;�;�D���'�'��d�3�3�3�3�3rc�<�|j�||��dSr)rGr�)r$�targetrps   r�processing_instructionz"ExpatParser.processing_instruction�s!����0�0���>�>�>�>�>rc�:�|j�|��dSr)rGr�)r$rps  r�character_datazExpatParser.character_data�r�rc�<�|j�||��dSr)rG�startPrefixMapping)r$�prefix�uris   rr�z ExpatParser.start_namespace_decl�s!����-�-�f�c�:�:�:�:�:rc�:�|j�|��dSr)rG�endPrefixMapping)r$r�s  rr�zExpatParser.end_namespace_decl�s����+�+�F�3�3�3�3�3rc�>�|j�|||��dSr)r=�startDTD)r$rW�sysid�pubid�has_internal_subsets     rr�zExpatParser.start_doctype_decl�s#����'�'��e�U�;�;�;�;�;rc�@�|j�||||��dSr)�_dtd_handler�unparsedEntityDecl)r$rW�baser�r��
notation_names      rr�z ExpatParser.unparsed_entity_decl�s%����,�,�T�5�%��O�O�O�O�Orc�>�|j�|||��dSr)r��notationDecl)r$rWr�r�r�s     rr�zExpatParser.notation_decl�s#����&�&�t�U�E�:�:�:�:�:rc���|jsdS|j�||��}tj||j���pd��}|j�|j	|jf��|j	�
|��|_	||_	tj�
||��n#YdSxYw|jd\|_	|_|jd=dS)Nr-�r���)r@�_ent_handler�
resolveEntityrrEr1r5r?�appendr(�ExternalEntityParserCreaterr:rI)r$�contextr�r�r�rLs      rr�zExpatParser.external_entity_ref�s����!�	��1��"�0�0���>�>���.�v�/3�|�/G�/G�/I�/I�02�/1�3�3��	
��!�!�4�<���">�?�?�?��|�>�>�w�G�G������	��'�-�-�d�F�;�;�;�;��	��1�1����'+�'9�"�'=�$���t�|���r�"��qs�  C�Cc�H�|rd|z}|j�|��dS)N�%)rG�
skippedEntity)r$rW�is_pes   rr�z"ExpatParser.skipped_entity_handler�s0���	��t�8�D���(�(��.�.�.�.�.rN)rr8)F)#rrrr&rIrOrQrXr\rbrfrtryrJr|rRrdrFr*r/r2r5r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr7r7Ws������.�	�	�	�	���� 7�7�7�'�'�'�

N�
N�
N�6�6�6�<O�O�O�$2�2�2� .�.�.�.�"@�@�@�	�	�	�!�!�!�*J�J�J�
6�6�6� # �# �# �N.�.�.�
,�,�,�
*�*�*�*�*�*�E�E�E�,�,�,� N� N� N�D	4�	4�	4�?�?�?�,�,�,�;�;�;�4�4�4�<�<�<�P�P�P�;�;�;����,/�/�/�/�/rr7c��t|i|��Sr)r7)�args�kwargss  r�
create_parserr��s����'��'�'�'r�__main__z:http://www.ibiblio.org/xml/examples/shakespeare/hamlet.xml),�version�xml.sax._exceptions�xml.sax.handlerrrrrrr	r
r�sys�platform�SAXReaderNotAvailable�xml.parsersrra�ImportError�xml.saxrrrr�r��_weakref�weakref�proxyrr�Locatorr r:r7r�r�xml.sax.saxutils�xml�prQ�sax�XMLGenerator�setErrorHandler�ErrorHandlerrIrrr�<module>rs����
��!�!�!�!�B�B�B�B�B�B�B�B�6�6�6�6�6�6�F�F�F�F�F�F�F�F�4�4�4�4�4�4�H�H�H�H�H�H�H�H��
�
�
��<�����v���
�
� =�t�
D�
D�D��A�!�!�!�!�!�!��7�5�.�)�)�A�#�#�$9�4�@�@�@�A���=�=�=�
�
� 5�t�
<�
<�<�=����
1�0�0�0�0�0�0�0�0�0��)���-��
��O�O�O�
�N�N�N��}�H�����
�������������	�	�	�	�	�	�	�	�
,�,�,�,�,�9�$�,�,�,�Hg/�g/�g/�g/�g/�)�-�y�/@�g/�g/�g/�V(�(�(�
�z��������
���A������(�5�5�7�7�8�8�8����c�g�*�*�,�,�-�-�-��G�G�H�I�I�I�I�I��s�A0�0B�B0�0B;�:B;