ok

Mini Shell

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

�

�fc0����	ddlZddlZddlmZgd�ZGd�d��ZGd�d��Zd�ZGd	�d
e	��Z
Gd�de	��ZGd
�d��Z[Gd�d��Z
Gd�d��ZdS)�N)�
NodeFilter)�
DOMBuilder�DOMEntityResolver�DOMInputSourcec�\�eZdZ	dZdZdZdZdZdZdZ	dZ
dZdZdZ
dZdZdZdZdZdZdZdZdS)�Options�TFN)�__name__�
__module__�__qualname__�
namespaces�namespace_declarations�
validation�external_parameter_entities�external_general_entities�external_dtd_subset�validate_if_schema�validate�datatype_normalization�create_entity_ref_nodes�entities�whitespace_in_element_content�cdata_sections�comments�charset_overrides_xml_encoding�infoset�supported_mediatypes_only�errorHandler�filter���9/opt/alt/python311/lib64/python3.11/xml/dom/xmlbuilder.pyrrs~��������J�!���J�"&�� $�������H�"��"���H�$(�!��N��H�%)�"��G� %���L�
�F�F�Fr!rc
�D�eZdZdZdZdZdZdZdZdZ	eeee	fZ
d�Zd�Zd�Z
d	�Zd
�Zd�Zd�Zd
�Zd�Zd�Ziddg�ddg�ddg�ddg�ddg�ddg�ddg�ddg�ddg�ddg�dddg�ddg�ddg�ddg�ddg�ddg�d d g�d!gd"gd#gggd$�d%gd&gd'gd(��Zd)�Zd*�Zd+�Zd,�Zd-�ZdS).rNr	���c�,�t��|_dS�N)r�_options��selfs r"�__init__zDOMBuilder.__init__9s���	�	��
�
�
r!c��|jSr(��entityResolverr*s r"�_get_entityResolverzDOMBuilder._get_entityResolver<s���"�"r!c��||_dSr(r.)r+r/s  r"�_set_entityResolverzDOMBuilder._set_entityResolver>s��,����r!c��|jSr(�rr*s r"�_get_errorHandlerzDOMBuilder._get_errorHandlerAs��� � r!c��||_dSr(r4)r+rs  r"�_set_errorHandlerzDOMBuilder._set_errorHandlerCs��(����r!c��|jSr(�rr*s r"�_get_filterzDOMBuilder._get_filterFs
���{�r!c��||_dSr(r9)r+rs  r"�_set_filterzDOMBuilder._set_filterHs
������r!c�r�|�|��rt|rdpd}	|jt|��|f}|D]\}}t|j||���dS#t
$r$tj�d|����d�wxYwtj�	dt|��z���)Nr	rzunsupported feature: zunknown feature: )�supportsFeature�	_settings�_name_xform�setattrr)�KeyError�xml�dom�NotSupportedErr�NotFoundErr�repr)r+�name�state�settings�values     r"�
setFeaturezDOMBuilder.setFeatureKs�������%�%�	H��K�a�$�1�E�
8��>�;�t�+<�+<�e�*D�E��
$,�8�8�K�D�%��D�M�4��7�7�7�7�8�8��	�
C�
C�
C��g�-�-�-�15��7�9�9�>B�C�
C�����'�%�%�&9�D��J�J�&F�G�G�Gs�A�.Bc�F�t|jt|����Sr()�hasattrr)r@)r+rHs  r"r>zDOMBuilder.supportsFeatureYs���t�}�k�$�&7�&7�8�8�8r!c�>�t|��|rdpdf}||jvS)Nr	r)r@r?)r+rHrI�keys    r"�
canSetFeaturezDOMBuilder.canSetFeature\s*���4� � �%�+�A�"2��3���d�n�$�$r!�rr)rr	)rr)rr)rr	)rr)rr	�rr�rr)rr	�rr)rr	)rr�rr	�rr)rr	)rr�rr	�rr�rr	)	rRrSrTrUrW)rr	rVrXrZ�rr�r
r�r
r	)rXrYrZ)rr)rr	r[r\r]c�d�t|��}	t|j|��S#t$r|dkrI|j}|jo8|jo1|jo*|jo#|jp|j	p|j
p
|jp|jcYStj�dt!|��z���wxYw)Nrzfeature %s not known)r@�getattrr)�AttributeErrorrrrrrrrrrrCrDrFrG)r+rH�xname�optionss    r"�
getFeaturezDOMBuilder.getFeature�s����D�!�!��	K��4�=�%�0�0�0���	K�	K�	K��y� � ��-���6�<�#�A�<�#�,�<�$�B�<�")�!?�";�$+�$>�";�$+�$C�";�%,�$4�";�%,�$:�	<�	=�=�=��'�%�%�&<�t�D�z�z�&I�J�J�J�	K���s�&�AB/�?0B/c��|jr|j�d|��}n"t���d|��}|�|��Sr()r/�
resolveEntityr�parse)r+�uri�inputs   r"�parseURIzDOMBuilder.parseURI�sU����	A��'�5�5�d�C�@�@�E�E�%�'�'�5�5�d�C�@�@�E��z�z�%� � � r!c��tj|j��}|j|_|j|_|j}|�*|jr#ddl}|j�|j��}|�	||��S�Nr)
�copyr)rr�
byteStream�systemId�urllib.request�request�urlopen�_parse_bytestream)r+rhrb�fp�urllibs     r"rfzDOMBuilder.parse�st���)�D�M�*�*������#�0���
�
��
�:�'�*�:�!�!�!�!���'�'���7�7�B��%�%�b�'�2�2�2r!c�P�||jvrtd���td���)Nznot a legal actionzHaven't written this yet...)�_legal_actions�
ValueError�NotImplementedError)r+rh�cnode�actions    r"�parseWithContextzDOMBuilder.parseWithContext�s.����,�,�,��1�2�2�2�!�"?�@�@�@r!c�r�ddl}|jj�|��}|�|��Srk)�xml.dom.expatbuilderrD�expatbuilder�makeBuilder�	parseFile)r+�streamrbrC�builders     r"rrzDOMBuilder._parse_bytestream�s:��#�#�#�#��'�&�2�2�7�;�;��� � ��(�(�(r!)r
rrr/rr�ACTION_REPLACE�ACTION_APPEND_AS_CHILDREN�ACTION_INSERT_AFTER�ACTION_INSERT_BEFORErvr,r0r2r5r7r:r<rLr>rQr?rcrirfr{rrr r!r"rr,s��������N��L�
�F��N� !������$�&?�)�+?�A�N�"�"�"�#�#�#�-�-�-�!�!�!�)�)�)�������H�H�H�9�9�9�%�%�%�;�%�)�(+�;�	&�)�(+�;�
	���;�	)�,�+.�;�	)�,�+.�;�	+�.�-0�;�	+�.�-0�;�	"�%�$'�;�"	'�*�),�#;�&	'�*�),�';�*	�*���+;�0	���1;�4	-�0�/2�5;�8	-�0�/2�9;�<	�!� #�=;�@	�!� #�A;�D	���E;�J
��
2�03�
2�03��	3�	3�	3�
-�+.�
��
��s;�;�;�I�zK�K�K�$!�!�!�3�3�3�A�A�A�
)�)�)�)�)r!rc�R�|����dd��S)N�-�_)�lower�replace)rHs r"r@r@�s ���:�:�<�<����S�)�)�)r!c�*�eZdZdZd�Zd�Zd�Zd�ZdS)r)�_openerc���t��}||_||_|����|��|_|�|��|_ddl}ddl	}|j
�|��}|\}}}	}
}}|	rT|	�d��s?|�
|	��dz}	|||	|
||f}|j
�|��|_|S)Nr�/)r�publicIdrn�_get_opener�openrm�_guess_media_encoding�encoding�	posixpath�urllib.parserf�urlparse�endswith�dirname�
urlunparse�baseURI)
r+r�rn�sourcer�rt�parts�scheme�netloc�path�params�query�fragments
             r"rezDOMEntityResolver.resolveEntity�s����!�!��"���"��� �,�,�.�.�3�3�H�=�=����4�4�V�<�<���	'�&�&�&�&�&�&�&���%�%�h�/�/��8=�5����f�e�X��	<��
�
�c�*�*�	<��$�$�T�*�*�S�0�D��F�D�&�%��A�E�#�\�4�4�U�;�;�F�N��
r!c�r�	|jS#t$r#|���|_|jcYSwxYwr()r�r`�_create_openerr*s r"r�zDOMEntityResolver._get_opener�sK��	 ��<����	 �	 �	 ��.�.�0�0�D�L��<����	 ���s�	�*6�6c�<�ddl}|j���Srk)rorp�build_opener)r+rts  r"r�z DOMEntityResolver._create_opener�s"�������~�*�*�,�,�,r!c��|j���}d|vr\|���D]I}|�d��r0|�dd��d���cS�HdSdS)NzContent-Typezcharset=�=r	)rm�info�getplist�
startswith�splitr�)r+r�r��params    r"r�z'DOMEntityResolver._guess_media_encoding�s���� �%�%�'�'���T�!�!������
:�
:���#�#�J�/�/�:� �;�;�s�A�.�.�q�1�7�7�9�9�9�9�9�:�"�!�
:�
:r!N)r
rr�	__slots__rer�r�r�r r!r"rr�sU�������I����, � � �-�-�-�:�:�:�:�:r!rc�l�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�ZdS)r�rm�characterStream�
stringDatar�r�rnr�c�h�d|_d|_d|_d|_d|_d|_d|_dSr(r�r*s r"r,zDOMInputSource.__init__s8�����#��������
���
���
�����r!c��|jSr(�rmr*s r"�_get_byteStreamzDOMInputSource._get_byteStream
�
����r!c��||_dSr(r�)r+rms  r"�_set_byteStreamzDOMInputSource._set_byteStreams
��$����r!c��|jSr(�r�r*s r"�_get_characterStreamz#DOMInputSource._get_characterStreams���#�#r!c��||_dSr(r�)r+r�s  r"�_set_characterStreamz#DOMInputSource._set_characterStreams��.����r!c��|jSr(�r�r*s r"�_get_stringDatazDOMInputSource._get_stringDatar�r!c��||_dSr(r�)r+�datas  r"�_set_stringDatazDOMInputSource._set_stringDatas
������r!c��|jSr(�r�r*s r"�
_get_encodingzDOMInputSource._get_encoding�
���}�r!c��||_dSr(r�)r+r�s  r"�
_set_encodingzDOMInputSource._set_encoding�
�� ��
�
�
r!c��|jSr(�r�r*s r"�
_get_publicIdzDOMInputSource._get_publicId!r�r!c��||_dSr(r�)r+r�s  r"�
_set_publicIdzDOMInputSource._set_publicId#r�r!c��|jSr(�rnr*s r"�
_get_systemIdzDOMInputSource._get_systemId&r�r!c��||_dSr(r�)r+rns  r"�
_set_systemIdzDOMInputSource._set_systemId(r�r!c��|jSr(�r�r*s r"�_get_baseURIzDOMInputSource._get_baseURI+s
���|�r!c��||_dSr(r��r+rgs  r"�_set_baseURIzDOMInputSource._set_baseURI-s
������r!N)r
rrr�r,r�r�r�r�r�r�r�r�r�r�r�r�r�r�r r!r"rrs�������@�I�������%�%�%�$�$�$�/�/�/����������!�!�!����!�!�!����!�!�!��������r!rc�@�eZdZ	dZdZdZdZejZ	d�Z
d�Zd�ZdS)	�DOMBuilderFilterr	r$r%r&c��|jSr()�
whatToShowr*s r"�_get_whatToShowz DOMBuilderFilter._get_whatToShowBr�r!c��|jSr(��
FILTER_ACCEPT�r+�elements  r"�
acceptNodezDOMBuilderFilter.acceptNodeE����!�!r!c��|jSr(r�r�s  r"�startContainerzDOMBuilderFilter.startContainerHr�r!N)
r
rrr��
FILTER_REJECT�FILTER_SKIP�FILTER_INTERRUPTr�SHOW_ALLr�r�r�r�r r!r"r�r�1se��������M��M��K����$�J����"�"�"�"�"�"�"�"r!r�c�8�eZdZ	dZd�Zd�Zd�Zd�Zd�Zd�Z	dS)	�
DocumentLSFc��dS)NFr r*s r"�
_get_asynczDocumentLS._get_asyncSs���ur!c�H�|rtj�d���dS)Nz.asynchronous document loading is not supported)rCrDrE)r+�flags  r"�
_set_asynczDocumentLS._set_asyncVs7���	B��'�)�)�@�B�B�
B�	B�	Br!c� �td���)Nz'haven't figured out what this means yet�rxr*s r"�abortzDocumentLS.abort[s��"�5�7�7�	7r!c� �td����Nzhaven't written this yetr�r�s  r"�loadzDocumentLS.loada���!�"<�=�=�=r!c� �td���r�r�)r+r�s  r"�loadXMLzDocumentLS.loadXMLdr�r!c��|�|}n'|j|urtj����|���Sr()�
ownerDocumentrCrD�WrongDocumentErr�toxml)r+�snodes  r"�saveXMLzDocumentLS.saveXMLgs>���=��E�E�
�
 ��
,�
,��'�*�*�,�,�,��{�{�}�}�r!N)
r
rr�async_r�r�r�r�r�rr r!r"r�r�Nsy������G�
�F����B�B�B�
7�7�7�>�>�>�>�>�>�����r!r�c�(�eZdZdZdZd�Zd�Zd�ZdS)�DOMImplementationLSr	r$c���|�tj�d���||jkrt	��S||jkrtj�d���t
d���)NzschemaType not yet supportedz'asynchronous builders are not supportedzunknown value for mode)rCrDrE�MODE_SYNCHRONOUSr�MODE_ASYNCHRONOUSrw)r+�mode�
schemaTypes   r"�createDOMBuilderz$DOMImplementationLS.createDOMBuilderssw���!��'�)�)�.�0�0�
0��4�(�(�(��<�<���4�)�)�)��'�)�)�9�;�;�
;��1�2�2�2r!c� �td���)Nz-the writer interface hasn't been written yet!r�r*s r"�createDOMWriterz#DOMImplementationLS.createDOMWriter~s��!�;�=�=�	=r!c��t��Sr()rr*s r"�createDOMInputSourcez(DOMImplementationLS.createDOMInputSource�s�����r!N)r
rrr	r
r
rrr r!r"rrosM����������	3�	3�	3�=�=�=� � � � � r!r)rl�xml.domrC�xml.dom.NodeFilterr�__all__rrr@�objectrrr�r�rr r!r"�<module>rs���:���������)�)�)�)�)�)�@�
?�
?����������@a)�a)�a)�a)�a)�a)�a)�a)�H*�*�*�):�):�):�):�):��):�):�):�X.�.�.�.�.�V�.�.�.�b"�"�"�"�"�"�"�"�4���������B � � � � � � � � � r!

Zerion Mini Shell 1.0