Hacked By AnonymousFox

Current Path : /proc/thread-self/root/proc/thread-self/root/proc/thread-self/root/proc/self/root/proc/self/root/lib64/python2.7/xml/dom/
Upload File :
Current File : //proc/thread-self/root/proc/thread-self/root/proc/thread-self/root/proc/self/root/proc/self/root/lib64/python2.7/xml/dom/expatbuilder.pyo

�
{fc@s�dZddlmZmZmZddlmZmZmZddlm	Z	ddl
mZmZddl
mZddlTejZejZejZejjZejjZejjZejjZej�Zi	ejed�d	6ejed
�d6ejed�d
6ejed�d6ejed�d6ejed�d6ejed�d6ejed�d6ejed�d6Zdefd��YZd�Zd�Z dfd��YZ!eeefZ"d efd!��YZ#d"efd#��YZ$d$e$fd%��YZ%d&e$fd'��YZ&d(Z'd)e'Z(d*e!fd+��YZ)d,fd-��YZ*d.e*e!fd/��YZ+d0e*e)fd1��YZ,d2e-fd3��YZ.d4e!fd5��YZ/e0d6�Z1e0d7�Z2e0d8�Z3e0d9�Z4d:�Z5d;S(<s�Facility to use the Expat parser to load a minidom instance
from a string or file.

This avoids all the overhead of SAX and pulldom to gain performance.
i����(t
xmlbuildertminidomtNode(tEMPTY_NAMESPACEtEMPTY_PREFIXtXMLNS_NAMESPACE(texpat(t
_append_childt_set_attribute_node(t
NodeFilter(t*tcdatatCDATAtenumerationtENUMtentitytENTITYtentitiestENTITIEStidtIDtidreftIDREFtidrefstIDREFStnmtokentNMTOKENtnmtokenstNMTOKENStElementInfocBsbeZdZd
d�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�ZRS(t
_attr_infot_modelttagNamecCs||_g|_||_dS(N(R RR(tselfR tmodel((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt__init__As		cCs|j|j|jfS(N(RRR (R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt__getstate__FscCs|\|_|_|_dS(N(RRR (R!tstate((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt__setstate__IscCs\xR|jD]G}|d|kr
|d}|ddkrBtdSt|dSq
q
WtjS(Nii����it(R(Rt
_typeinfo_mapRt_no_type(R!tanametinfott((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytgetAttributeTypeLs
cCstjS(N(RR)(R!tnamespaceURIt	localName((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytgetAttributeTypeNSVscCs:|jr2|jd}|tjjtjjfkStSdS(Ni(RRR"t
XML_CTYPE_ANYtXML_CTYPE_MIXEDtFalse(R!ttype((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytisElementContentYs
	
cCs(|jr |jdtjjkStSdS(Ni(RRR"tXML_CTYPE_EMPTYR3(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytisEmptyas	cCs6x/|jD]$}|d|kr
|ddkSq
WtS(Nii����R(RR3(R!R*R+((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytisIdgscCs|j||f�S(N(R8(R!teuritenametauriR*((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytisIdNSms(RRR N(
t__name__t
__module__t	__slots__tNoneR#R$R&R-R0R5R7R8R<(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR>s			
				cCs|j||�S(N(t_intern_setdefault(tbuilderts((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt_internqscCs�|jd�}|j}t|�dkry|\}}}|||�}d||f}|||�}|||�}n%|\}}t}|||�}}|||�|||fS(Nt is%s:%s(tsplitRAtlenR(RBtnametpartstinternturit	localnametprefixtqname((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt_parse_ns_namets	tExpatBuildercBs
eZdZdd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(sPDocument builder that uses Expat to build a ParsedXML.DOM document
    instance.cCsw|dkrtj�}n||_|jjdk	rNt|jj�|_nd|_t|_d|_	|j
�dS(N(R@RtOptionst_optionstfiltertFilterVisibilityControllert_filterRt_finish_start_elementt_parsertreset(R!toptions((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR#�s				cCs
tj�S(sCreate a new parser object.(RtParserCreate(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytcreateParser�scCsh|jsa|j�|_|jjj|_t|j_t|j_t|j_|j	|j�n|jS(s7Return the parser object, creating a new one if needed.(
RWR[RJt
setdefaultRAtTruetbuffer_texttordered_attributestspecified_attributestinstall(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt	getParser�s	cCs@tjtdd�|_|j|_|jj|_t|_dS(s6Free all data structures used during DOM construction.N(	ttheDOMImplementationtcreateDocumentRR@tdocumenttcurNodet
_elem_infoR3t_cdata(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRX�s
cCs�|j|_|j|_|j|_|j|_|jj	rK|j
|_n|j|_
|jjrr|j|_n|jjr�|j|_|j|_|j|_n|j|_|j|_|j|_|j|_|j|_ dS(s>Install the callbacks needed to build the DOM into the parser.N(!tstart_doctype_decl_handlertStartDoctypeDeclHandlertfirst_element_handlertStartElementHandlertend_element_handlertEndElementHandlert
pi_handlertProcessingInstructionHandlerRRRtentity_decl_handlertEntityDeclHandlertnotation_decl_handlertNotationDeclHandlertcommentstcomment_handlertCommentHandlertcdata_sectionststart_cdata_section_handlertStartCdataSectionHandlertend_cdata_section_handlertEndCdataSectionHandlertcharacter_data_handler_cdatatCharacterDataHandlertcharacter_data_handlertexternal_entity_ref_handlertExternalEntityRefHandlertxml_decl_handlertXmlDeclHandlertelement_decl_handlertElementDeclHandlertattlist_decl_handlertAttlistDeclHandler(R!tparser((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRa�s$cCs�|j�}t}ylxU|jd�}|s1Pn|j|d�|rc|jjrc|j|�nt}qW|jdt�Wntk
r�nX|j}|j	�d|_|S(sIParse a document from a file object, returning the document
        node.iiiti@N(RbR]treadtParseRetdocumentElementt
_setup_subsetR3tParseEscapeRXR@RW(R!tfileR�tfirst_buffertbuffertdoc((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt	parseFile�s$

	
	cCsa|j�}y!|j|t�|j|�Wntk
r@nX|j}|j�d|_|S(s<Parse a document from a string, returning the document node.N(	RbR�R]R�R�ReRXR@RW(R!tstringR�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytparseString�s
	
	cCsD|jjr@t�}|j|�|j�}||jj_ndS(s/Load the internal subset if there might be one.N(RetdoctypetInternalSubsetExtractorR�t	getSubsettinternalSubset(R!R�t	extractortsubset((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s
	
cCs�|jjj|||�}|j|_t|j|�||j_|jr�|jj|�tkr�d|j_|jj
d=d}d|j_d|j_
n|r�|dk	r�g|j_g|j_nd|j_d|j_|j|j_ndS(Ni����(RetimplementationtcreateDocumentTypet
ownerDocumentRR�RUt
acceptNodet
FILTER_REJECTR@t
childNodesRWRrRtRt_seqt	notationsRwRptend_doctype_decl_handlertEndDoctypeDeclHandler(R!tdoctypeNametsystemIdtpublicIdthas_internal_subsetR�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRi�s$!
cCsO|jjr|j|j_n|j|j_|jp<|jsKt	|_
ndS(N(RRRuRvRWRwRoRpRgRURt_finish_end_element(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�s
cCs]|jj||�}t|j|�|jrY|jj|�tkrY|jj|�ndS(N(RetcreateProcessingInstructionRRfRUR�R�tremoveChild(R!ttargettdatatnode((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRos!cCs�|jj}|jrd|jrF|djtkrF|dj|�dS|jj|�}t	|_n�|r�|djt
kr�|d}|j|}|j}||d<|d<dSt
j�}|j}||d<|d<|j|d<t|j|�dS(Ni����R�t	nodeValueR�(RfR�Rht_cdata_continuetnodeTypetCDATA_SECTION_NODEt
appendDataRetcreateCDATASectionR]t	TEXT_NODER�t__dict__RtTextR(R!R�R�R�tvaluetd((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR}s&		

		
cCs�|jj}|rU|djtkrU|d}|j}|j||d<|d<dStj�}|j}|j||d<|d<|j|d<t	|j|�dS(Ni����R�R�R�(
RfR�R�R�R�R�RR�ReR(R!R�R�R�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR(s
		
c
Cs�|r
dS|jjsdS|jj||||�}|dk	rf|jj|�}	|jj|	�n|jjjj	j|�|j
r�|j
j|�tkr�|jjjj	d=ndS(Ni����(
RRRRet_create_entityR@tcreateTextNodeR�tappendR�R�RUR�R�(
R!t
entityNametis_parameter_entityR�tbaseR�R�tnotationNameR�tchild((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRq5s!cCsl|jj|||�}|jjjjj|�|jrh|jj|�tkrh|jjjjd=ndS(Ni����(	Ret_create_notationR�R�R�R�RUR�t
FILTER_ACCEPT(R!R�R�R�R�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRsGs!cCsZ|jj|�}t|j|�|jrV|jj|�tkrV|jj|�ndS(N(Ret
createCommentRRfRUR�R�R�(R!R�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRvMs!cCst|_t|_dS(N(R]RhR3R�(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRySs	cCst|_t|_dS(N(R3RhR�(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR{Ws	cCsdS(Ni((R!tcontextR�R�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�[scCsK|jdkr%|jr%t|_n|j|j�_|j||�dS(N(RUR@RgRR�tstart_element_handlerRbRl(R!RHt
attributes((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRk^scCs�|jj|�}t|j|�||_|r�x�tdt|�d�D]�}tj||tdt
�}||d}|jdj}||d<|d<|j}||d<|d<|j|d<t
||�qJWn||jjk	r�|j|�ndS(NiiiR�R�R�R�(Ret
createElementRRftrangeRGRtAttrRR@RR�R�RR�RV(R!RHR�R�titaR�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�ds 		
cCs�|jr�||jjkrdS|jj|�}|tkrJt|�n|tkrct|�ndS|j|_	|jj
|�|j�ndS(N(RUReR�tstartContainerR�tRejectertFILTER_SKIPtSkippert
parentNodeRfR�tunlink(R!R�tfilt((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRVxs	

cCs&|j}|j|_|j|�dS(N(RfR�R�(R!RHRf((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRm�s	cCs�|jj|j�}|r.|j||�n|jr�||jjkrMdS|jj|�tkr�|j	j
|�|j�q�ndS(N(RgtgetR t_handle_white_text_nodesRUReR�R�R�RfR�R�(R!RfR+((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s	cCs�|jjs|j�rdSg}x@|jD]5}|jtkr-|jj�r-|j|�q-q-Wx|D]}|j	|�qmWdS(N(
RRtwhitespace_in_element_contentR5R�R�R�R�tstripR�R�(R!R�R+tLR�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s

cCsD|jj|�}|dkr7t||�|j|<n	||_dS(N(RgR�R@RR(R!RHR"R+((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��sc	Csf|jj|�}|dkr:t|�}||j|<n|jjd|dd|d||g�dS(Ni(RgR�R@RRR�(R!telemRHR4tdefaulttrequiredR+((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s	cCsL||j_||j_|dkrH|r9t|j_qHt|j_ndS(Ni(RetversiontencodingR]t
standaloneR3(R!R�R�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��sN( R=R>t__doc__R@R#R[RbRXRaR�R�R�RiR�RoR}RRqRsRvRyR{R�RkR�RVRmR�R�R�R�R�(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRP�s:						
						
														RTcBs�eZdZdZd�Zd�Zd�Zieje	j
6eje	j6ej
e	j6eje	j6eje	j6eje	j6eje	j6eje	j6eje	j6eje	j6eje	j6eje	j 6Z!RS(soWrapper around a DOMBuilderFilter which implements the checks
    to make the whatToShow filter attribute work.RScCs
||_dS(N(RS(R!RS((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR#�scCsu|j|j}|jj|@rm|jj|�}|tkrGt�n|tkritdt	|��n|St
SdS(Ns)startContainer() returned illegal value: (t_nodetype_maskR�RSt
whatToShowR�tFILTER_INTERRUPTR�t_ALLOWED_FILTER_RETURNSt
ValueErrortreprR�(R!R�tmasktval((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s	cCs�|j|j}|jj|@r�|jj|�}|tkrGt�n|tkr�|j}x|j	D]}|j
|�qgWtS|tkr�t
dt|��n|StSdS(Ns%acceptNode() returned illegal value: (R�R�RSR�R�R�R�R�R�R�tappendChildR�R�R�R�R�(R!R�R�R�tparentR�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s		(RS("R=R>R�R?R#R�R�R	tSHOW_ELEMENTRtELEMENT_NODEtSHOW_ATTRIBUTEtATTRIBUTE_NODEt	SHOW_TEXTR�tSHOW_CDATA_SECTIONR�tSHOW_ENTITY_REFERENCEtENTITY_REFERENCE_NODEtSHOW_ENTITYtENTITY_NODEtSHOW_PROCESSING_INSTRUCTIONtPROCESSING_INSTRUCTION_NODEtSHOW_COMMENTtCOMMENT_NODEt
SHOW_DOCUMENTt
DOCUMENT_NODEtSHOW_DOCUMENT_TYPEtDOCUMENT_TYPE_NODEtSHOW_DOCUMENT_FRAGMENTtDOCUMENT_FRAGMENT_NODEt
SHOW_NOTATIONt
NOTATION_NODER�(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRT�s$		
	










tFilterCrutchcBseZdZd�ZRS(t_buildert_levelt
_old_startt_old_endcCsOd|_||_|j}|j|_|j|_|j|_|j|_dS(Ni(	RRRWRlRRnRR�Rm(R!RBR�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR#s			(RRRR(R=R>R?R#(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR	sR�cBs)eZdZd�Zd�Zd�ZRS(cCs>tj||�|j}xdD]}t||d�q WdS(NRpRwR~RzR|R�(RpRwR~RzR|R�(RR#RWtsetattrR@(R!RBR�RH((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR#s	
cGs|jd|_dS(Ni(R(R!targs((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�$scGsZ|jdkrF|jj}|jj|�|j|_|j|_n|jd|_dS(Nii(RRRWRaRRlRRn(R!RR�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRm's((R=R>R?R#R�Rm(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�s		R�cBs eZdZd�Zd�ZRS(cGsB|jj}|j|�|jj|k	r>|jd|_ndS(Ni(RRfRR(R!RR�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�4s
cGs`|jdkr?|j|jj_|j|jj_d|_n|jd|_|j|�dS(Nii(RRRRWRlRRnR@(R!R((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRm:s((R=R>R?R�Rm(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�1s	s8http://xml.python.org/entities/fragment-builder/internals�<!DOCTYPE wrapper
  %%s [
  <!ENTITY fragment-builder-internal
    SYSTEM "%s">
%%s
]>
<wrapper %%s
>&fragment-builder-internal;</wrapper>tFragmentBuildercBsPeZdZdd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(	s�Builder which constructs document fragments given XML source
    text and a context node.

    The context node is expected to provide information about the
    namespace declarations which are in scope at the start of the
    fragment.
    cCsM|jtkr$||_||_n|j|_||_tj||�dS(N(R�R�toriginalDocumentR�R�RPR#(R!R�RY((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR#bs		cCstj|�d|_dS(N(RPRXR@tfragment(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRXks
cCs|j|j��S(sRParse a document fragment from a file object, returning the
        fragment node.(R�R�(R!R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�osc	Cs�||_|j�}|jj}d}|r�|jp?|j�}|jrdd|j|jf}q�|jr�d|j}q�nd}|j�}t	|||f}y|j
|d�Wn|j��nX|j}|j�|S(sMParse a document fragment from a string, returning the
        fragment node.R�sPUBLIC "%s" "%s"sSYSTEM "%s"i(
t_sourceRbR	R�R�t_getDeclarationsR�R�t_getNSattrst_FRAGMENT_BUILDER_TEMPLATER�RXR
(	R!R�R�R�tidentR�tnsattrsReR
((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�ts,			
	
cCs�|jjj}d}|r�x�t|jj�D]v}|jj|�}|rY|d}nd||jf}|jr�d||j|j	f}q.d||j	f}q.Wx�t|j
j�D]�}|j
j|�}|r�|d}nd||jf}|jrd||j|j	f}n5|j	r=d||j	f}nd	||jjf}|j
rrd
||j
f}n|d}q�Wn|S(s�Re-create the internal subset from the DocumentType node.

        This is only needed if we don't already have the
        internalSubset as a string.
        R�s
  s%s<!NOTATION %ss!%s PUBLIC "%s"
             "%s">s%s SYSTEM "%s">s
%s<!ENTITY %ss %s PUBLIC "%s"
             "%s"s%s SYSTEM "%s"s%s "%s"s%s NOTATION %st>(R�R�R�R�R�tlengthtitemtnodeNameR�R�Rt
firstChildR�R�(R!R�RCR�tnotationR((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�s6
	
			cCsdS(NR�((R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR
�scCs�|tkr�|j}|j}|jj|�}|j|_|jj�|_|j|_z|j|j	d�Wd||_||_d|_	XdStj|||||�SdS(Nii����(
t$_FRAGMENT_BUILDER_INTERNAL_SYSTEM_IDReRfRWtExternalEntityParserCreateR	tcreateDocumentFragmentR
R�RR@RPR�(R!R�R�R�R�told_documenttold_cur_nodeR�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s				
N(R=R>R�R@R#RXR�R�RR
R�(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRYs					$	t
NamespacescBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(s7Mix-in class for builders; adds support for namespaces.cCs
g|_dS(N(t_ns_ordered_prefixes(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt_initNamespaces�scCstjdd�}t|_|S(s'Create a new namespace-handling parser.tnamespace_separatorRE(RRZR]tnamespace_prefixes(R!R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR[�s	cCs/tj||�|jjr+|j|_ndS(s.Insert the namespace-handlers onto the parser.N(RPRaRRtnamespace_declarationststart_namespace_decl_handlertStartNamespaceDeclHandler(R!R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRa�scCs|jj||f�dS(s/Push this namespace declaration on our storage.N(RR�(R!RMRK((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR"�scCs�d|kr*t||�\}}}}nt}|}d}t}tj||||�}|j|_t|j	|�||_	|j
rIx�|j
D]�\}}|r�tjt|d|�t
|d�}ntjdt
dt�}|jdj}	||	d<|	d<|j}	||	d<|	d<|j|	d<t||�q�W|j
2n|r�|j}
|j}xtdt|�d	�D]}||}
||d
}d|
kr�t||
�\}}}}tj||||�}||
|<||||f<n2tj|
t|
t�}||
|
<||t|
f<|jdj}	||	d<|	d<|j}	|j|	d<||	d<|	d<||	d<qzWndS(NREsxmlns:txmlnsiR�R�R�R�iitownerElement(RORR@RRtElementReR�RRfRR�RDRR�R�Rt_attrst_attrsNSR�RG(R!RHR�RKRLRMRNR�R�R�R'R(R�R*R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��sZ			

		


	
(R=R>R�RR[RaR"R�(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�s					4tExpatBuilderNScBseZdZd�ZRS(s*Document builder that supports namespaces.cCstj|�|j�dS(N(RPRXR(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRX5s
(R=R>R�RX(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR)2stFragmentBuilderNScBs eZdZd�Zd�ZRS(s*Fragment builder that supports namespaces.cCstj|�|j�dS(N(RRXR(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRX=s
cCs�d}|j}g}x�|r�t|d�r�x�|jj�D]p\}}||kr[q=n|j|�|r{d|}nd}|r�d|||f}q=d||f}q=Wn|j}qW|S(sNReturn string of namespace attributes from this element and
        ancestors.R�t_ns_prefix_urisxmlns:R$s%s
    %s='%s's %s='%s'(R�thasattrR+titemsR�R�(R!tattrsR�R�RMRKtdeclname((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR
As"		


(R=R>R�RXR
(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR*:s	R�cBseZdZRS(sEException raised to short-circuit parsing in InternalSubsetExtractor.(R=R>R�(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�_sR�cBsSeZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
d�ZRS(	sBXML processor which can rip out the internal document type subset.cCs|jS(s'Return the internal subset as a string.(R�(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�hscCs,ytj||�Wntk
r'nXdS(N(RPR�R�(R!R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�ls
cCs,ytj||�Wntk
r'nXdS(N(RPR�R�(R!R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�rs
cCs|j|_|j|_dS(N(RiRjR�Rl(R!R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRaxscCsF|r9|j�}g|_|jj|_|j|_n	t��dS(N(RbR�R�tDefaultHandlerR�R�R�(R!RHR�R�R�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRi|s	cCs@dj|j�jdd�jdd�}||_t��dS(NR�s
s
s
(tjoinR�treplaceR�(R!RC((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s*	cCs
t��dS(N(R�(R!RHR.((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��sN(R=R>R�R@R�R�R�R�RaRiR�R�(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�cs					
	cCsp|rt�}n	t�}t|t�r]t|d�}z|j|�}Wd|j�Xn|j|�}|S(s{Parse a document, returning the resulting Document node.

    'file' may be either a file name or an open file object.
    trbN(R)RPt
isinstancetStringTypestopenR�tclose(R�t
namespacesRBtfptresult((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytparse�s	cCs(|rt�}n	t�}|j|�S(sOParse a document from a string, returning the resulting
    Document node.
    (R)RPR�(R�R8RB((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s	cCsv|rt|�}nt|�}t|t�rct|d�}z|j|�}Wd|j�Xn|j|�}|S(s�Parse a fragment of a document, given the context from which it
    was originally extracted.  context should be the parent of the
    node(s) which are in the fragment.

    'file' may be either a file name or an open file object.
    R3N(R*RR4R5R6R�R7(R�R�R8RBR9R:((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt
parseFragment�scCs.|rt|�}nt|�}|j|�S(s�Parse a fragment of a document from a string, given the context
    from which it was originally extracted.  context should be the
    parent of the node(s) which are in the fragment.
    (R*RR�(R�R�R8RB((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytparseFragmentString�scCs!|jrt|�St|�SdS(s,Create a builder based on an Options object.N(R8R)RP(RY((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytmakeBuilder�s	
N(6R�txml.domRRRRRRtxml.parsersRtxml.dom.minidomRRtxml.dom.NodeFilterR	txml.dom.minicompatR�R�R�tDOMBuilderFilterR�R�R�R�tgetDOMImplementationRctTypeInfoR@R(tobjectRRDRORPR�RTRR�R�RRRRR)R*t	ExceptionR�R�R]R;R�R<R=R>(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt<module>s`
			3		�I:ud%,

Hacked By AnonymousFox1.0, Coded By AnonymousFox