AlkantarClanX12

Your IP : 18.188.91.223


Current Path : /opt/alt/python33/lib64/python3.3/xml/dom/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/xml/dom/__pycache__/pulldom.cpython-33.pyc

�
��f�-c@s�ddlZddlZdZdZdZdZdZdZdZ	d	Z
Gd
d�dejj�Z
Gdd
�d
�ZGdd�d�ZGdd�de
�ZdZdddd�Zddd�ZdS(iNu
START_ELEMENTuEND_ELEMENTuCOMMENTuSTART_DOCUMENTuEND_DOCUMENTuPROCESSING_INSTRUCTIONuIGNORABLE_WHITESPACEu
CHARACTERScBs�|EeZdZd#Zd#Zd#dd�Zdd�Zdd�Zdd�Z	d	d
�Z
dd�Zd
d�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#S($uPullDOMcCs�ddlm}||_ddg|_|j|_g|_|jj|_y|jj	|_	Wnt
k
rsYnXid|6g|_|jd|_g|_
dS(Ni(u
XML_NAMESPACEuxmlii����(uxml.domu
XML_NAMESPACEudocumentFactoryuNoneu
firstEventu	lastEventuelementStackuappendupushupopuAttributeErroru_ns_contextsu_current_contextupending_events(uselfudocumentFactoryu
XML_NAMESPACE((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyu__init__s		
uPullDOM.__init__cCs|jd}|jd=|S(Nii����i����(uelementStack(uselfuresult((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyupop!s

uPullDOM.popcCs
||_dS(N(u_locator(uselfulocator((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyusetDocumentLocator&suPullDOM.setDocumentLocatorcCsgt|d�sg|_n|jj|p-d|f�|jj|jj��|pYd|j|<dS(Nu_xmlns_attrsuxmlns(uhasattru_xmlns_attrsuappendu_ns_contextsu_current_contextucopyuNone(uselfuprefixuuri((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyustartPrefixMapping)s
uPullDOM.startPrefixMappingcCs|jj�|_dS(N(u_ns_contextsupopu_current_context(uselfuprefix((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuendPrefixMapping0suPullDOM.endPrefixMappingcCs;d}t|dd�}|dk	rZx'|D]\}}||j||f<q+Wg|_n|\}}	|r�|dkr�|j|}
|
r�|
d|	}q�|	}n|jr�|jj||�}q|j||�}n0|jr�|jj|	�}n|jd|	�}x�|j	�D]�\}}|\}}
||kr�|
dkrQ|
}n
d|
}|jj
||�}|j|�nt|r�|j|}
|
r�|
d|
}n|
}|jj
||�}|j|�n|jj|
�}|j
|�||_qWt|fdg|jd<|jd|_|j|�dS(Nuhttp://www.w3.org/2000/xmlns/u_xmlns_attrsu:uxmlnsuxmlns:i(ugetattruNoneu_attrsu_xmlns_attrsu_current_contextudocumentucreateElementNSu
buildDocumentu
createElementuitemsucreateAttributeNSusetAttributeNodeNSucreateAttributeusetAttributeNodeuvalueu
START_ELEMENTu	lastEventupush(uselfunameutagNameuattrsu	xmlns_uriuxmlns_attrsuanameuvalueuuriu	localnameuprefixunodeua_uriua_localnameuqnameuattr((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyustartElementNS3sP
				



uPullDOM.startElementNScCs3t|j�fdg|jd<|jd|_dS(Ni(uEND_ELEMENTupopuNoneu	lastEvent(uselfunameutagName((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuendElementNSlsuPullDOM.endElementNScCs�|jr|jj|�}n|jd|�}xB|j�D]4\}}|jj|�}||_|j|�q=Wt|fdg|j	d<|j	d|_	|j
|�dS(Ni(udocumentu
createElementu
buildDocumentuNoneuitemsucreateAttributeuvalueusetAttributeNodeu
START_ELEMENTu	lastEventupush(uselfunameuattrsunodeuanameuvalueuattr((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyustartElementps		uPullDOM.startElementcCs3t|j�fdg|jd<|jd|_dS(Ni(uEND_ELEMENTupopuNoneu	lastEvent(uselfuname((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyu
endElementsuPullDOM.endElementcCsm|jrG|jj|�}t|fdg|jd<|jd|_n"t|fdg}|jj|�dS(Ni(udocumentu
createCommentuCOMMENTuNoneu	lastEventupending_eventsuappend(uselfusunodeuevent((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyucomment�s	uPullDOM.commentcCss|jrJ|jj||�}t|fdg|jd<|jd|_n%t||fdg}|jj|�dS(Ni(udocumentucreateProcessingInstructionuPROCESSING_INSTRUCTIONuNoneu	lastEventupending_eventsuappend(uselfutargetudataunodeuevent((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuprocessingInstruction�s	uPullDOM.processingInstructioncCs?|jj|�}t|fdg|jd<|jd|_dS(Ni(udocumentucreateTextNodeuIGNORABLE_WHITESPACEuNoneu	lastEvent(uselfucharsunode((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuignorableWhitespace�suPullDOM.ignorableWhitespacecCs?|jj|�}t|fdg|jd<|jd|_dS(Ni(udocumentucreateTextNodeu
CHARACTERSuNoneu	lastEvent(uselfucharsunode((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyu
characters�suPullDOM.characterscCs7|jdkr3ddl}|jjjj|_ndS(Ni(udocumentFactoryuNoneuxml.dom.minidomudomuminidomuDocumentuimplementation(uselfuxml((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyu
startDocument�suPullDOM.startDocumentc	Cs8|jj||d�}||_t|fdg|jd<|jd|_|j|�x�|jD]�}|ddtkr�|d\}}}|jj	||�}t|f|d<nX|ddt
kr�|jj|dd�}t
|f|d<ntd|dd��||jd<||_qaWd|_|j
S(NiiuUnknown pending event (udocumentFactoryucreateDocumentuNoneudocumentuSTART_DOCUMENTu	lastEventupushupending_eventsuPROCESSING_INSTRUCTIONucreateProcessingInstructionuCOMMENTu
createCommentuAssertionErroru
firstChild(	uselfuuriutagnameunodeueu_utargetudataun((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyu
buildDocument�s$	


	uPullDOM.buildDocumentcCs*t|jfdg|jd<|j�dS(Ni(uEND_DOCUMENTudocumentuNoneu	lastEventupop(uself((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuendDocument�suPullDOM.endDocumentcCs
d|_dS(u.clear(): Explicitly release parsing structuresN(uNoneudocument(uself((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuclear�su
PullDOM.clearN(u__name__u
__module__u__qualname__uNoneu_locatorudocumentu__init__upopusetDocumentLocatorustartPrefixMappinguendPrefixMappingustartElementNSuendElementNSustartElementu
endElementucommentuprocessingInstructionuignorableWhitespaceu
charactersu
startDocumentu
buildDocumentuendDocumentuclear(u
__locals__((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuPullDOM
s&9		uPullDOMcBs8|EeZdZdd�Zdd�Zdd�ZdS(uErrorHandlercCst|�dS(N(uprint(uselfu	exception((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuwarning�suErrorHandler.warningcCs
|�dS(N((uselfu	exception((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuerror�suErrorHandler.errorcCs
|�dS(N((uselfu	exception((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyu
fatalError�suErrorHandler.fatalErrorN(u__name__u
__module__u__qualname__uwarninguerroru
fatalError(u
__locals__((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuErrorHandler�suErrorHandlercBs�|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�ZdS(uDOMEventStreamcCsJ||_||_||_t|jd�s<|j|_n|j�dS(Nufeed(ustreamuparserubufsizeuhasattru_slurpugetEventureset(uselfustreamuparserubufsize((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyu__init__�s			uDOMEventStream.__init__cCs?t�|_|jjtjjjd�|jj|j�dS(Ni(	uPullDOMupulldomuparseru
setFeatureuxmlusaxuhandlerufeature_namespacesusetContentHandler(uself((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyureset�suDOMEventStream.resetcCs |j�}|r|St�dS(N(ugetEventu
IndexError(uselfuposurc((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyu__getitem__�suDOMEventStream.__getitem__cCs |j�}|r|St�dS(N(ugetEventu
StopIteration(uselfurc((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyu__next__�suDOMEventStream.__next__cCs|S(N((uself((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyu__iter__�suDOMEventStream.__iter__cCs�|j�}|g}x�|r�|\}}||kr:dS|tkrZ|dj|�n|tkrv|j|�n|tkr�|d=n|j�}qWdS(Nii����i����(ugetEventuEND_ELEMENTuappendChildu
START_ELEMENTuappend(uselfunodeueventuparentsutokenucur_node((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyu
expandNode�s		
uDOMEventStream.expandNodecCs�|jjds%|jj|j_nxP|jjdsw|jj|j�}|sd|jj�dS|jj	|�q(W|jjdd}|jjdd|jjd<|S(Nii(
upulldomu
firstEventu	lastEventustreamureadubufsizeuparserucloseuNoneufeed(uselfubufurc((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyugetEvent�s
uDOMEventStream.getEventcCs)|jj|j�|j|_|j�S(u� Fallback replacement for getEvent() using the
            standard SAX2 interface, which means we slurp the
            SAX events into memory (no performance gain, but
            we are compatible to all SAX parsers).
        (uparseruparseustreamu_emitugetEvent(uself((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyu_slurpsuDOMEventStream._slurpcCs6|jjdd}|jjdd|jjd<|S(un Fallback replacement for getEvent() that emits
            the events that _slurp() read previously.
        ii(upulldomu
firstEvent(uselfurc((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyu_emitsuDOMEventStream._emitcCs)|jj�|`d|_d|_dS(u+clear(): Explicitly release parsing objectsN(upulldomuclearuNoneuparserustream(uself((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuclears
	uDOMEventStream.clearN(
u__name__u
__module__u__qualname__u__init__uresetu__getitem__u__next__u__iter__u
expandNodeugetEventu_slurpu_emituclear(u
__locals__((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuDOMEventStream�s
uDOMEventStreamcBsP|EeZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS(uSAX2DOMcCsAtj||||�|jd}|jd}|j|�dS(Niii����i����(uPullDOMustartElementNSuelementStackuappendChild(uselfunameutagNameuattrsucurNodeu
parentNode((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyustartElementNS#s

uSAX2DOM.startElementNScCs>tj|||�|jd}|jd}|j|�dS(Niii����i����(uPullDOMustartElementuelementStackuappendChild(uselfunameuattrsucurNodeu
parentNode((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyustartElement)s

uSAX2DOM.startElementcCsBtj|||�|jdd}|jd}|j|�dS(Niii����(uPullDOMuprocessingInstructionu	lastEventuelementStackuappendChild(uselfutargetudataunodeu
parentNode((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuprocessingInstruction/s
uSAX2DOM.processingInstructioncCs?tj||�|jdd}|jd}|j|�dS(Niii����(uPullDOMuignorableWhitespaceu	lastEventuelementStackuappendChild(uselfucharsunodeu
parentNode((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuignorableWhitespace5s
uSAX2DOM.ignorableWhitespacecCs?tj||�|jdd}|jd}|j|�dS(Niii����(uPullDOMu
charactersu	lastEventuelementStackuappendChild(uselfucharsunodeu
parentNode((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyu
characters;s
uSAX2DOM.charactersN(u__name__u
__module__u__qualname__ustartElementNSustartElementuprocessingInstructionuignorableWhitespaceu
characters(u
__locals__((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuSAX2DOM!s
uSAX2DOMiiicCsd|dkrt}nt|t�r6t|d�}n|}|sTtjj�}nt|||�S(Nurb(	uNoneudefault_bufsizeu
isinstanceustruopenuxmlusaxumake_parseruDOMEventStream(ustream_or_stringuparserubufsizeustream((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuparseDs	uparsecCsPddlm}t|�}||�}|s@tjj�}nt|||�S(Ni(uStringIO(uiouStringIOulenuxmlusaxumake_parseruDOMEventStream(ustringuparseruStringIOubufsizeubuf((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyuparseStringOsuparseStringi@i�?(uxml.saxuxmluxml.sax.handleru
START_ELEMENTuEND_ELEMENTuCOMMENTuSTART_DOCUMENTuEND_DOCUMENTuPROCESSING_INSTRUCTIONuIGNORABLE_WHITESPACEu
CHARACTERSusaxuContentHandleruPullDOMuErrorHandleruDOMEventStreamuSAX2DOMudefault_bufsizeuNoneuparseuparseString(((u4/opt/alt/python33/lib64/python3.3/xml/dom/pulldom.pyu<module>s �U!