AlkantarClanX12

Your IP : 18.223.206.84


Current Path : /opt/alt/python37/lib64/python3.7/xml/dom/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/xml/dom/__pycache__/xmlbuilder.cpython-37.opt-2.pyc

B

YI~ds0�@s�ddlZddlZddlZddlmZdddgZGdd�d�ZGdd�d�Zd	d
�Z	Gdd�de
�ZGdd�de
�ZGd
d�d�Z
[Gdd�d�ZGdd�d�ZdS)�N)�
NodeFilter�
DOMBuilder�DOMEntityResolver�DOMInputSourcec@sXeZdZdZdZdZdZdZdZdZ	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�7/opt/alt/python37/lib64/python3.7/xml/dom/xmlbuilder.pyr
s&
rc@s&eZdZdZdZdZdZdZdZdZ	eeee	fZ
dd�Zdd	�Zd
d�Z
dd
�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdgdgdgdgdgdgd gd!gd"gd#gd"d$gd%gd&gd'gd(gd)gd*gd+gd,gd-ggdd!d"d$d(d.d'd+d-g	d/gd0gd1gd2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�ZdS)=rNr���cCst�|_dS)N)r�_options)�selfrrr�__init__:szDOMBuilder.__init__cCs|jS)N)�entityResolver)r"rrr�_get_entityResolver=szDOMBuilder._get_entityResolvercCs
||_dS)N)r$)r"r$rrr�_set_entityResolver?szDOMBuilder._set_entityResolvercCs|jS)N)r)r"rrr�_get_errorHandlerBszDOMBuilder._get_errorHandlercCs
||_dS)N)r)r"rrrr�_set_errorHandlerDszDOMBuilder._set_errorHandlercCs|jS)N)r)r"rrr�_get_filterGszDOMBuilder._get_filtercCs
||_dS)N)r)r"rrrr�_set_filterIszDOMBuilder._set_filtercCs�|�|�rx|rdpd}y|jt|�|f}Wn(tk
rTtj�d|f�d�Yq�Xx4|D]\}}t|j||�q\Wntj�	dt
|���dS)Nrrzunsupported feature: %rzunknown feature: )�supportsFeature�	_settings�_name_xform�KeyError�xml�dom�NotSupportedErr�setattrr!�NotFoundErr�repr)r"�name�stateZsettings�valuerrr�
setFeatureLs
zDOMBuilder.setFeaturecCst|jt|��S)N)�hasattrr!r-)r"r5rrrr+ZszDOMBuilder.supportsFeaturecCst|�|rdpdf}||jkS)Nrr)r-r,)r"r5r6�keyrrr�
canSetFeature]szDOMBuilder.canSetFeature)rr)rr)r
r)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr))rr)rr)r
r)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rr)rrcCs�t|�}yt|j|�Stk
r�|dkrj|j}|joh|joh|joh|joh|jpf|j	pf|j
pf|jpf|jSt
j�dt|���YnXdS)Nrzfeature %s not known)r-�getattrr!�AttributeErrorrrrrrrrrrr/r0r3r4)r"r5Zxname�optionsrrr�
getFeature�s zDOMBuilder.getFeaturecCs.|jr|j�d|�}nt��d|�}|�|�S)N)r$�
resolveEntityr�parse)r"�uri�inputrrr�parseURI�szDOMBuilder.parseURIcCsRt�|j�}|j|_|j|_|j}|dkrF|jrFddl}|j�|j�}|�	||�S)Nr)
�copyr!rr�
byteStream�systemId�urllib.request�requestZurlopen�_parse_bytestream)r"rCr>�fp�urllibrrrrA�szDOMBuilder.parsecCs||jkrtd��td��dS)Nznot a legal actionzHaven't written this yet...)�_legal_actions�
ValueError�NotImplementedError)r"rCZcnode�actionrrr�parseWithContext�s
zDOMBuilder.parseWithContextcCs ddl}|jj�|�}|�|�S)Nr)Zxml.dom.expatbuilderr0ZexpatbuilderZmakeBuilderZ	parseFile)r"�streamr>r/ZbuilderrrrrJ�szDOMBuilder._parse_bytestream)rr	r
r$rrZACTION_REPLACEZACTION_APPEND_AS_CHILDRENZACTION_INSERT_AFTERZACTION_INSERT_BEFORErMr#r%r&r'r(r)r*r8r+r;r,r?rDrArQrJrrrrr-st

cCs|���dd�S)N�-�_)�lower�replace)r5rrrr-�sr-c@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)r)�_openerc
Cs�t�}||_||_|���|�|_|�|�|_ddl}ddl	}|j
�|�}|\}}}	}
}}|	r�|	�d�s�|�
|	�d}	|||	|
||f}|j
�|�|_|S)Nr�/)r�publicIdrG�_get_opener�openrF�_guess_media_encoding�encoding�	posixpathZurllib.parserAZurlparse�endswith�dirnameZ
urlunparse�baseURI)
r"rYrG�sourcer^rL�partsZschemeZnetloc�path�paramsZqueryZfragmentrrrr@�szDOMEntityResolver.resolveEntitycCs,y|jStk
r&|��|_|jSXdS)N)rWr=�_create_opener)r"rrrrZ�s

zDOMEntityResolver._get_openercCsddl}|j��S)Nr)rHrIZbuild_opener)r"rLrrrrf�sz DOMEntityResolver._create_openercCsF|j��}d|krBx.|��D]"}|�d�r|�dd�d��SqWdS)NzContent-Typezcharset=�=r)rF�infoZgetplist�
startswith�splitrU)r"rbrhZparamrrrr\�s


z'DOMEntityResolver._guess_media_encodingN)rr	r
�	__slots__r@rZrfr\rrrrr�s
c@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)rF�characterStream�
stringDatar]rYrGracCs.d|_d|_d|_d|_d|_d|_d|_dS)N)rFrlrmr]rYrGra)r"rrrr#szDOMInputSource.__init__cCs|jS)N)rF)r"rrr�_get_byteStreamszDOMInputSource._get_byteStreamcCs
||_dS)N)rF)r"rFrrr�_set_byteStreamszDOMInputSource._set_byteStreamcCs|jS)N)rl)r"rrr�_get_characterStreamsz#DOMInputSource._get_characterStreamcCs
||_dS)N)rl)r"rlrrr�_set_characterStreamsz#DOMInputSource._set_characterStreamcCs|jS)N)rm)r"rrr�_get_stringDataszDOMInputSource._get_stringDatacCs
||_dS)N)rm)r"�datarrr�_set_stringDataszDOMInputSource._set_stringDatacCs|jS)N)r])r"rrr�
_get_encodingszDOMInputSource._get_encodingcCs
||_dS)N)r])r"r]rrr�
_set_encodingszDOMInputSource._set_encodingcCs|jS)N)rY)r"rrr�
_get_publicId"szDOMInputSource._get_publicIdcCs
||_dS)N)rY)r"rYrrr�
_set_publicId$szDOMInputSource._set_publicIdcCs|jS)N)rG)r"rrr�
_get_systemId'szDOMInputSource._get_systemIdcCs
||_dS)N)rG)r"rGrrr�
_set_systemId)szDOMInputSource._set_systemIdcCs|jS)N)ra)r"rrr�_get_baseURI,szDOMInputSource._get_baseURIcCs
||_dS)N)ra)r"rBrrr�_set_baseURI.szDOMInputSource._set_baseURIN)rr	r
rkr#rnrorprqrrrtrurvrwrxryrzr{r|rrrrrs 	c@s:eZdZdZdZdZdZejZ	dd�Z
dd�Zd	d
�ZdS)�DOMBuilderFilterrrrr cCs|jS)N)�
whatToShow)r"rrr�_get_whatToShowCsz DOMBuilderFilter._get_whatToShowcCs|jS)N)�
FILTER_ACCEPT)r"�elementrrr�
acceptNodeFszDOMBuilderFilter.acceptNodecCs|jS)N)r�)r"r�rrr�startContainerIszDOMBuilderFilter.startContainerN)
rr	r
r�Z
FILTER_REJECTZFILTER_SKIPZFILTER_INTERRUPTrZSHOW_ALLr~rr�r�rrrrr}2s
r}c@s@eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dS)�
DocumentLSFcCsdS)NFr)r"rrr�
_get_asyncTszDocumentLS._get_asynccCs|rtj�d��dS)Nz.asynchronous document loading is not supported)r/r0r1)r"�flagrrr�
_set_asyncWszDocumentLS._set_asynccCstd��dS)Nz'haven't figured out what this means yet)rO)r"rrr�abort\szDocumentLS.abortcCstd��dS)Nzhaven't written this yet)rO)r"rBrrr�loadbszDocumentLS.loadcCstd��dS)Nzhaven't written this yet)rO)r"rbrrr�loadXMLeszDocumentLS.loadXMLcCs*|dkr|}n|j|k	r"tj���|��S)N)Z
ownerDocumentr/r0ZWrongDocumentErrZtoxml)r"Zsnoderrr�saveXMLhs


zDocumentLS.saveXMLN)
rr	r
Zasync_r�r�r�r�r�r�rrrrr�Osr�c@s,eZdZdZdZdd�Zdd�Zdd�Zd	S)
�DOMImplementationLSrrcCsF|dk	rtj�d��||jkr$t�S||jkr:tj�d��td��dS)NzschemaType not yet supportedz'asynchronous builders are not supportedzunknown value for mode)r/r0r1�MODE_SYNCHRONOUSr�MODE_ASYNCHRONOUSrN)r"�modeZ
schemaTyperrr�createDOMBuilderts

z$DOMImplementationLS.createDOMBuildercCstd��dS)Nz-the writer interface hasn't been written yet!)rO)r"rrr�createDOMWritersz#DOMImplementationLS.createDOMWritercCst�S)N)r)r"rrr�createDOMInputSource�sz(DOMImplementationLS.createDOMInputSourceN)rr	r
r�r�r�r�r�rrrrr�ps
r�)rE�warningsZxml.domr/Zxml.dom.NodeFilterr�__all__rrr-�objectrrr}r�r�rrrr�<module>s
 %,1!