AlkantarClanX12

Your IP : 3.142.250.86


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

o

6��fc0�@s�	ddlZddlZddlmZgd�ZGdd�d�ZGdd�d�Zdd	�ZGd
d�de	�Z
Gdd
�d
e	�ZGdd�d�Z[Gdd�d�Z
Gdd�d�ZdS)�N)�
NodeFilter)�
DOMBuilder�DOMEntityResolver�DOMInputSourcec@sZeZdZ	dZdZdZdZdZdZdZ	dZ
dZdZdZ
dZdZdZdZdZdZdZdZdS)�Options�TFN)�__name__�
__module__�__qualname__�
namespaces�namespace_declarations�
validation�external_parameter_entities�external_general_entitiesZexternal_dtd_subset�validate_if_schemaZvalidate�datatype_normalization�create_entity_ref_nodes�entities�whitespace_in_element_content�cdata_sections�comments�charset_overrides_xml_encoding�infoset�supported_mediatypes_only�errorHandler�filter�rr�9/opt/alt/python310/lib64/python3.10/xml/dom/xmlbuilder.pyrs*	rc
@s`eZdZdZdZdZdZdZdZdZ	eeee	fZ
dd�Zdd	�Zd
d�Z
dd
�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Ziddg�ddg�ddg�ddg�ddg�ddg�d d g�d!d!g�d"d"g�d#d#g�d$d"d$g�d%d%g�d&d&g�d'd'g�d(d(g�d)d)g�d*d*g�d+gd,gd-gggd.�d/gd0gd1gd2��Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�ZdS)=rNr���cCst�|_dS�N)r�_options��selfrrr�__init__9szDOMBuilder.__init__cC�|jSr!��entityResolverr#rrr�_get_entityResolver<�zDOMBuilder._get_entityResolvercC�
||_dSr!r')r$r(rrr�_set_entityResolver>�
zDOMBuilder._set_entityResolvercCr&r!�rr#rrr�_get_errorHandlerAr*zDOMBuilder._get_errorHandlercCr+r!r.)r$rrrr�_set_errorHandlerCr-zDOMBuilder._set_errorHandlercCr&r!�rr#rrr�_get_filterFr*zDOMBuilder._get_filtercCr+r!r1)r$rrrr�_set_filterHr-zDOMBuilder._set_filtercCs�|�|�r8|r	dp
d}z|jt|�|f}Wnty'tj�d|f�d�w|D]\}}t|j||�q*dStj�	dt
|���)Nrrzunsupported feature: %rzunknown feature: )�supportsFeature�	_settings�_name_xform�KeyError�xml�dom�NotSupportedErr�setattrr"�NotFoundErr�repr)r$�name�stateZsettings�valuerrr�
setFeatureKs
����zDOMBuilder.setFeaturecCst|jt|��Sr!)�hasattrr"r6)r$r>rrrr4Y�zDOMBuilder.supportsFeaturecCst|�|rdpdf}||jvS)Nrr)r6r5)r$r>r?�keyrrr�
canSetFeature\s
zDOMBuilder.canSetFeature�rr)rr)r
r)rr)rr)rr)rr�rr�rr)rr�rr)rr)rr�rr�rr)rr)rr�rr�rr�rr)	rFrGrHrIrK)rrrJrLrN�rr�rr�rr)rLrMrN)rr)rrrOrPrQcCs�t|�}zt|j|�WStyA|dkr7|j}|jo4|jo4|jo4|jo4|jp3|j	p3|j
p3|jp3|jYSt
j�dt|���w)Nrzfeature %s not known)r6�getattrr"�AttributeErrorrrrrrrrrrr8r9r<r=)r$r>Zxname�optionsrrr�
getFeature�s2��������	�zDOMBuilder.getFeaturecCs.|jr|j�d|�}nt��d|�}|�|�Sr!)r(�
resolveEntityr�parse)r$�uri�inputrrr�parseURI�s
zDOMBuilder.parseURIcCsRt�|j�}|j|_|j|_|j}|dur#|jr#ddl}|j�|j�}|�	||�S�Nr)
�copyr"rr�
byteStream�systemId�urllib.request�requestZurlopen�_parse_bytestream)r$rYrT�fp�urllibrrrrW�szDOMBuilder.parsecCs||jvr	td��td��)Nznot a legal actionzHaven't written this yet...)�_legal_actions�
ValueError�NotImplementedError)r$rYZcnode�actionrrr�parseWithContext�s
zDOMBuilder.parseWithContextcCs ddl}|jj�|�}|�|�Sr[)Zxml.dom.expatbuilderr9ZexpatbuilderZmakeBuilderZ	parseFile)r$�streamrTr8Zbuilderrrrra�s
zDOMBuilder._parse_bytestream)rr	r
r(rrZACTION_REPLACEZACTION_APPEND_AS_CHILDRENZACTION_INSERT_AFTERZACTION_INSERT_BEFORErdr%r)r,r/r0r2r3rAr4rEr5rUrZrWrhrarrrrr,s��	��������	����
������������������ ��"��%�������=
rcCs|���dd�S)N�-�_)�lower�replace)r>rrrr6�rCr6c@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)r)�_openerc
Cs�t�}||_||_|���|�|_|�|�|_ddl}ddl	}|j
�|�}|\}}}	}
}}|	rJ|	�d�sJ|�
|	�d}	|||	|
||f}|j
�|�|_|S)Nr�/)r�publicIdr^�_get_opener�openr]�_guess_media_encoding�encoding�	posixpathZurllib.parserWZurlparse�endswith�dirnameZ
urlunparse�baseURI)
r$rpr^�sourcerurc�partsZschemeZnetloc�path�paramsZqueryZfragmentrrrrV�szDOMEntityResolver.resolveEntitycCs,z|jWSty|��|_|jYSwr!)rnrS�_create_openerr#rrrrq�s

�zDOMEntityResolver._get_openercCsddl}|j��Sr[)r_r`Zbuild_opener)r$rcrrrr}�s
z DOMEntityResolver._create_openercCsJ|j��}d|vr!|��D]}|�d�r |�dd�d��Sq
dSdS)NzContent-Typezcharset=�=r)r]�infoZgetplist�
startswith�splitrl)r$ryrZparamrrrrs�s

��z'DOMEntityResolver._guess_media_encodingN)rr	r
�	__slots__rVrqr}rsrrrrr�src@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zd S)!r�r]�characterStream�
stringDatartrpr^rxcCs.d|_d|_d|_d|_d|_d|_d|_dSr!r�r#rrrr%s
zDOMInputSource.__init__cCr&r!�r]r#rrr�_get_byteStream
r*zDOMInputSource._get_byteStreamcCr+r!r�)r$r]rrr�_set_byteStreamr-zDOMInputSource._set_byteStreamcCr&r!�r�r#rrr�_get_characterStreamr*z#DOMInputSource._get_characterStreamcCr+r!r�)r$r�rrr�_set_characterStreamr-z#DOMInputSource._set_characterStreamcCr&r!�r�r#rrr�_get_stringDatar*zDOMInputSource._get_stringDatacCr+r!r�)r$�datarrr�_set_stringDatar-zDOMInputSource._set_stringDatacCr&r!�rtr#rrr�
_get_encodingr*zDOMInputSource._get_encodingcCr+r!r�)r$rtrrr�
_set_encodingr-zDOMInputSource._set_encodingcCr&r!�rpr#rrr�
_get_publicId!r*zDOMInputSource._get_publicIdcCr+r!r�)r$rprrr�
_set_publicId#r-zDOMInputSource._set_publicIdcCr&r!�r^r#rrr�
_get_systemId&r*zDOMInputSource._get_systemIdcCr+r!r�)r$r^rrr�
_set_systemId(r-zDOMInputSource._set_systemIdcCr&r!�rxr#rrr�_get_baseURI+r*zDOMInputSource._get_baseURIcCr+r!r��r$rXrrr�_set_baseURI-r-zDOMInputSource._set_baseURIN)rr	r
r�r%r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrs"	rc@s<eZdZ	dZdZdZdZejZ	dd�Z
dd�Zd	d
�ZdS)�DOMBuilderFilterrrrr cCr&r!)�
whatToShowr#rrr�_get_whatToShowBr*z DOMBuilderFilter._get_whatToShowcCr&r!��
FILTER_ACCEPT�r$Zelementrrr�
acceptNodeEr*zDOMBuilderFilter.acceptNodecCr&r!r�r�rrr�startContainerHr*zDOMBuilderFilter.startContainerN)
rr	r
r�Z
FILTER_REJECTZFILTER_SKIPZFILTER_INTERRUPTrZSHOW_ALLr�r�r�r�rrrrr�1s	r�c@sBeZdZ	dZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS)�
DocumentLSFcCsdS)NFrr#rrr�
_get_asyncSszDocumentLS._get_asynccCs|rtj�d��dS)Nz.asynchronous document loading is not supported)r8r9r:)r$�flagrrr�
_set_asyncVs
��zDocumentLS._set_asynccC�td��)Nz'haven't figured out what this means yet�rfr#rrr�abort[s�zDocumentLS.abortcCr��Nzhaven't written this yetr�r�rrr�loada�zDocumentLS.loadcCr�r�r�)r$ryrrr�loadXMLdr�zDocumentLS.loadXMLcCs0|dur
|}|��S|j|urtj���|��Sr!)Z
ownerDocumentr8r9ZWrongDocumentErrZtoxml)r$Zsnoderrr�saveXMLgs
�
zDocumentLS.saveXMLN)
rr	r
Zasync_r�r�r�r�r�r�rrrrr�Nsr�c@s,eZdZdZdZdd�Zdd�Zdd�Zd	S)
�DOMImplementationLSrrcCsB|dur
tj�d��||jkrt�S||jkrtj�d��td��)NzschemaType not yet supportedz'asynchronous builders are not supportedzunknown value for mode)r8r9r:�MODE_SYNCHRONOUSr�MODE_ASYNCHRONOUSre)r$�modeZ
schemaTyperrr�createDOMBuilderss�

�z$DOMImplementationLS.createDOMBuildercCr�)Nz-the writer interface hasn't been written yet!r�r#rrr�createDOMWriter~s�z#DOMImplementationLS.createDOMWritercCst�Sr!)rr#rrr�createDOMInputSource�r*z(DOMImplementationLS.createDOMInputSourceN)rr	r
r�r�r�r�r�rrrrr�osr�)r\Zxml.domr8Zxml.dom.NodeFilterr�__all__rrr6�objectrrr�r�r�rrrr�<module>s %,1!