KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/lib64/python2.4/xml/dom/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.4/xml/dom/minidom.pyc
m
=5Dc@s
dZdkZdklZlZlZlZdkTdkl	Z	l
Z
efZei
iiei
iifZdei
iefdYZeeddd	eed
ddeeddd
dZdZdZdZdZdefdYZdefdYZeedddeedddeeddddeefdYZeedddeZd efd!YZeeeZ d"efd#YZ!ee!d$dd%ee!ddd&d'Z"d(fd)YZ#d*e#efd+YZ$d,e#efd-YZ%ee%ddd.d/e%fd0YZ&ee&d1dd2ee&d3dd4d5Z'd6Z(d7e#e%fd8YZ)d9e&fd:YZ*d;eefd<YZ+ee+ddd=d>fd?YZ,d@e,e#efdAYZ-dBe,efdCYZ.dDe,e#efdEYZ/dFe	fdGYZ0dHefdIYZ1dJZ2dKee
fdLYZ3ee3dMddNdOZ4dPZ5dQZ6dRZ7eedSZ8edTZ9edUZ:dS(Vs(minidom.py -- a lightweight DOM implementation.

parse("foo.xml")

parseString("<foo><bar/></foo>")

Todo:
=====
 * convenience methods for getting elements and text.
 * more testing
 * bring some of the writer and linearizer code into conformance with this
        interface
 * SAX 2 namespaces
N(sEMPTY_NAMESPACEsEMPTY_PREFIXsXMLNS_NAMESPACEsdomreg(t*(sDOMImplementationLSs
DocumentLStNodecBstZdZdZdZdZdZeZ	dZ
ddZddddZdZ
dZdZd	Zd
ZdZdZd
ZdZdZdZdZdZdZdZdZdZdZRS(NcCstS(N(tTrue(tself((t'/usr/lib64/python2.4/xml/dom/minidom.pyt__nonzero__+scCs|idd|S(Nt(Rttoprettyxmltencoding(RR((Rttoxml.ss	s
cCst}|dj	o&dk}|i|d|}n|iti	jo|i
|d|||n|i
|d|||i
S(NiR(t
_get_StringIOtwriterRtNonetcodecstlookupRtnodeTypeRt
DOCUMENT_NODEtwritexmltindenttnewltgetvalue(RRRRRR
((RR1s	
	cCs|iotSntSdS(N(Rt
childNodesRtFalse(R((Rt
hasChildNodes@s
cCs|iS(N(RR(R((Rt_get_childNodesFscCs|io|idSndS(Ni(RR(R((Rt_get_firstChildIs
cCs|io|idSndS(Ni(RR(R((Rt_get_lastChildMs
cCs|i|ijo2x't|iD]}|i||q#W|Sn|i|i	jo,t
iidt
|t
|fn|idj	o|ii|n|djo|i|ny|ii|}Wn"tj
ot
iinX|itjot|n|ii||||_||_|o'|i|d}||_||_n
d|_||_|S(Ns%s cannot be child of %si(tnewChildRRtDOCUMENT_FRAGMENT_NODEttupleRtctinsertBeforetrefChildt_child_node_typestxmltdomtHierarchyRequestErrtreprt
parentNodeRtremoveChildtappendChildtindext
ValueErrortNotFoundErrt_nodeTypes_with_childrent_clear_id_cachetinserttnextSiblingtpreviousSiblingtnode(RRR R)RR1((RRQs6,
			
		cCs|i|ijo/x$t|iD]}|i|q#W|Sn|i|ijo,t	i
idt|t|fn|it
jot|n|idj	o|ii|nt||d|_|S(Ns%s cannot be child of %s(R1RRRRRRR(R!R"R#R$R%R,R-R&RR't
_append_childR/(RR1R((RR(qs,
	cCs|i|ijo*|i}|i||i||Sn|i|i	jo,t
iidt
|t
|fn||jodSn|idj	o|ii|ny|ii|}Wn"tj
ot
iinX||i|<||_d|_|itjp|itjot|n|i|_|i|_d|_d|_|io||i_n|io||i_n|S(Ns%s cannot be child of %s(RRRRtoldChildR/R R'RR!R"R#R$R%R&RRR)R*R+R,R-R0(RRR3R)R ((RtreplaceChilds8	
,

		 		

cCsy|ii|Wn"tj
otiinX|idj	o|i
|i_
n|i
dj	o|i|i
_nd|_|_
|itjot
|nd|_|S(N(RRtremoveR3R*R"R#R+R/RR0RR,R-R&(RR3((RR's	cCsPg}x9|iD].}|itijo|i}|oU|oN|di|ijo7|d}|i|i|_|i	|_	|i
q>|o?|o||d_	|d|_n
d|_|i
|q>|i
q|o||d_	|d|_n
d|_|i
||itijo|iqqW||i(dS(Ni(tLRRtchildRRt	TEXT_NODEtdataR1R/tunlinkR0RtappendtELEMENT_NODEt	normalize(RR1R6R7R9((RR=s2
	%

	
	
cCst|||ip|S(N(t_clone_nodeRtdeept
ownerDocument(RR?((Rt	cloneNodescCs|iii||S(N(RR@timplementationt
hasFeaturetfeaturetversion(RRDRE((RtisSupportedscCsdS(N(R(R((Rt_get_localNamescCs
||jS(N(Rtother(RRH((Rt
isSameNodescCs#|i|do|SndSdS(N(RRFRDR(RRD((RtgetInterfacescCs7y|i|dSWnttfj
odSnXdS(Ni(Rt
_user_datatkeytAttributeErrortKeyErrorR(RRL((RtgetUserDatascCsd}y
|i}Wn"tj
oh}||_nX|i|o||d}n|djo"d}|dj	o||=qn||f||<|S(Ni(
RtoldRRKtdRMthas_keyRLR9thandler(RRLR9RSRPRQ((RtsetUserDatas


cCsht|doTxQ|iiD]<\}\}}|dj	o|i|||||q q WndS(NRK(thasattrRRKtitemsRLR9RSRthandlet	operationtsrctdst(RRXRYRZRSRLR9((Rt_call_user_data_handlers

cCs^d|_|_|io.x|iD]}|iq$Wt|_nd|_d|_	dS(N(
RRR&R@RR7R:tNodeListR0R/(RR7((RR:s

	(t__name__t
__module__RtnamespaceURIR&R@R/R0tEMPTY_PREFIXtprefixRR	RRRRRRR(R4R'R=RARFRGRIRJRORTR[R:(((RR"s6						 		 		 					
			t
firstChildtdocsFirst child node, or None.t	lastChildsLast child node, or None.t	localNames"Namespace-local name of this node.cCsV|i}|o(|d}||id<||id<n|i|||id<dS(NiR0R/R&(RRtlastR1t__dict__R;(RR1RRf((RR2s	


cCs=x6|dj	o(|itijotSn|i}qWtS(N(R1RRRRRR&R(R1((Rt_in_document#s
cCsM|iddidd}|iddidd}|i|d	S(
sWrites datachars to writer.t&s&amp;t<s&lt;s"s&quot;t>s&gt;N(R9treplaceRtwrite(RR9((Rt_write_data+scCsixb|iD]W}|itijo.|djp|i|jo|i	|nt
|||q
W|S(NR(tparentRR1RRR<tnamettagNametrcR;t_get_elements_by_tagName_helper(RoRpRrR1((RRs1s
0cCsx|iD]{}|itijob|djp|i|jo.|djp|i|jo|i
|nt||||q
q
W|S(NR(RoRR1RRR<RetnsURIR_RrR;t"_get_elements_by_tagName_ns_helper(RoRtReRrR1((RRu9s
:tDocumentFragmentcBsbtZeiZdZdZdZdZ	ei
eieiei
eieieifZdZRS(Ns#document-fragmentcCst|_dS(N(R\RR(R((Rt__init__Ps(R]R^RRRtnodeNameRt	nodeValuet
attributesR&R<R8tCDATA_SECTION_NODEtENTITY_REFERENCE_NODEtPROCESSING_INSTRUCTION_NODEtCOMMENT_NODEt
NOTATION_NODER!Rw(((RRvBs	0tAttrcBstZeiZdZdZeZ	eZ
eieifZ
edddZdZdZdZdZdZdZdZd	Zd
ZRS(NcCsS|i}||d<|d<||d<||d<t|d<|iit	dS(NRxRpR_RaR(
RRgRQtqNameR_RaR\RR;tText(RRR_ReRaRQ((RRw]s	


cCs|iidddS(Nt:ii(RRxtsplit(R((RRGkscCs|iS(N(RRp(R((Rt	_get_namenscCs|iS(N(Rt	specified(R((Rt_get_specifiedqscCs|i}|djoY||d<|d<|idi}||d<|d<|idj	ot	|iqnO|djo7||d<|d<|idj	ot	|iqn|||<dS(	NtvalueRyiR9RpRx(svalues	nodeValue(snamesnodeName(
RRgRQRpRRtd2townerElementRR-(RRpRRRQ((Rt__setattr__ts	

cCs|i}|djo.|o#|tjotiidqDn|i}||d<|djo
|i}nd||if}|i
ot|i
n||d<|d<dS(Ntxmlnss5illegal use of 'xmlns' prefix for the wrong namespaceRas%s:%sRxRp(RR_tnsuriRatXMLNS_NAMESPACER"R#tNamespaceErrRgRQRRetnewNameRR-(RRaRQRR((Rt_set_prefixs	
	



cCsJ|i}||d<|d<|iot|in||id_dS(NRRyi(RRgRQRRR-RR9(RRRQ((Rt
_set_values
	
cCs|i}|dj	o_|i|i=|i|i|if=|i	o.t
|_	|id8_|ii
d8_
qunx|iD]}|iqW|i2dS(Ni(RRtelemRt_attrsRxt_attrsNSR_Ret_is_idRt_magic_id_nodesR@t_magic_id_countRR7R:(RRR7((RR:s	


	
cCs|iotSn|i}|i}|djp
|djotSn|i	|}|djotSn|io|i|i|i
Sn|i|iSdS(N(RRRR@RcRRRRt_get_elem_infotinfoR_tisIdNSRetisIdRx(RRRcR((Rt	_get_isIds
		

cCs|i}|i}|djp
|djotSn|i|}|djotSn|i	o|i
|i	|iSn|i|i
SdS(N(RR@RcRRRt_no_typeRRR_tgetAttributeTypeNSRetgetAttributeTypeRx(RRRcR((Rt_get_schemaTypes		

(R]R^RtATTRIBUTE_NODERRRzRRRRR8R|R!tEMPTY_NAMESPACERwRGRRRRRR:RR(((RRTs 									Rs True if this attribute is an ID.s'Namespace-local name of this attribute.t
schemaTypesSchema type for this attribute.tNamedNodeMapcBstZdZdZdZdZdZdZdZd	Z	d
Z
dZdZe
d
ZeZdZdZdZdZdZdZdZdZdZdZdZdZRS(sThe attribute list is a transient interface to the underlying
    dictionaries.  Mutations here will change the underlying element's
    dictionary.

    Ordering is imposed artificially and does not reflect the order of
    attributes as found in an input document.
    RRt
_ownerElementcCs||_||_||_dS(N(tattrsRRtattrsNSRRR(RRRR((RRws		cCs
t|iS(N(tlenRR(R((Rt_get_lengthscCs7y||ii|SWntj
odSnXdS(N(RRtkeysR)t
IndexErrorR(RR)((RtitemscCs=g}x0|iiD]}|i|i|ifqW|S(N(R6RRtvaluesR1R;RxR(RR1R6((RRVs
cCsFg}x9|iiD](}|i|i|if|ifqW|S(N(	R6RRRR1R;R_ReR(RR1R6((RtitemsNSs
&cCs8t|to|ii|Sn|ii|SdS(N(t
isinstanceRLtStringTypesRRRRR(RRL((RRRscCs
|iiS(N(RRR(R((RRscCs
|iiS(N(RRR(R((RtkeysNSscCs
|iiS(N(RRR(R((RRscCs|ii||S(N(RRtgetRpR(RRpR((RRscCsA|it|ddjodSntt|t|SdS(NRi(RRtgetattrRHRtcmptid(RRH((Rt__cmp__scCs.t|to|i|Sn|i|SdS(N(Rtattname_or_tuplet
_TupleTypeRRR(RR((Rt__getitem__
scCst|to\y|i|}Wn;tj
o/t|}|i	i
|_
|i|nX||_n1t|tp
tdn|}|i|dS(Ns%value must be a string or Attr object(
RRRRRtattnameR1RNRRR@tsetNamedItemt	TypeError(RRRR1((Rt__setitem__s

cCs-y|i|SWntj
odSnXdS(N(RRRpRNR(RRp((RtgetNamedItem#scCs3y|i||fSWntj
odSnXdS(N(RRR_ReRNR(RR_Re((RtgetNamedItemNS)scCs|i|}|dj	o\t|i|i|i=|i	|i
|if=|ii
dod|id<n|SntiidS(NR(RRRptnRR-RRRxRR_ReRgRRR"R#R+(RRpR((RtremoveNamedItem/s


cCs|i||}|dj	o\t|i|i|i|if=|i	|i
=|iidod|id<n|Snt
iidS(NR(RRR_ReRRR-RRRRxRgRRR"R#R+(RR_ReR((RtremoveNamedItemNS;s


cCst|tp,tiidt|t|fn|ii	|i
}|o|in||i|i
<||i
|i|if<|i|_t|i|S(Ns%s cannot be child of %s(RR1RR"R#R$R%RRRRpRPR:RR_ReRRR-(RR1RP((RRGs,
cCs
|i|S(N(RRR1(RR1((RtsetNamedItemNSTscCs%||}t|i|idS(N(RRR1R-RR:(RRR1((Rt__delitem__Ws

cCs|i|i|ifS(N(RRRR(R((Rt__getstate__\scCs|\|_|_|_dS(N(tstateRRRR(RR((Rt__setstate___s(s_attrss_attrsNSs
_ownerElement(R]R^t__doc__t	__slots__RwRRRVRRRRRRRRt__len__RRRRRRRRRRRR(((RRs2																	
			tlengths$Number of nodes in the NamedNodeMap.tTypeInfocBs2tZdZdZdZdZdZRS(Nt	namespaceRpcCs||_||_dS(N(RRRp(RRRp((RRwks	cCs1|iod|i|ifSnd|iSdS(Ns<TypeInfo %r (from %r)>s
<TypeInfo %r>(RRRp(R((Rt__repr__os
cCs|iS(N(RRp(R((RRuscCs|iS(N(RR(R((Rt_get_namespacexs(s	namespacesname(R]R^RRwRRR(((RRhs
			tElementcBsLtZeiZdZeZdZ	eiei
eieiei
eifZedddZdZdZdZdZdZdZd	Zd
ZdZdZeZd
ZdZdZeZ dZ!dZ"dZ#dZ$dZ%ddddZ&dZ'dZ(dZ)dZ*dZ+RS(NicCsD||_|_||_||_t|_h|_h|_dS(N(	RqRRxRaR_R\RRR(RRqR_RaRe((RRws			cCs|iidddS(NRii(RRqR(R((RRGscCs|iS(N(RRq(R((Rt_get_tagNamescCsGx!|iiD]}|iqWd|_d|_ti|dS(N(RRRtattrR:RRR(RR((RR:s		cCs0y|i|iSWntj
odSnXdS(NR(RRRRRN(RR((RtgetAttributescCs6y|i||fiSWntj
odSnXdS(NR(RRR_ReRRN(RR_Re((RtgetAttributeNSscCs|i|}|djoEt|}|i}||d<|d<|i	|d<|i
|nH||ijo7|i}||d<|d<|iot|qndS(NRRyR@(
RtgetAttributeNodeRRRRRgRQRR@tsetAttributeNodeRR-(RRRRQR((RtsetAttributes
	
	
cCst|\}}|i||}|djobt	||||}|i
}||d<||d<||d<|d<|i
|d<|i|np|i
}||ijo.||d<|d<|iot|qn|i|jo||d<||d<ndS(NRaRxRRyR@(t_nssplitt
qualifiedNameRat	localnameRtgetAttributeNodeNSR_RRRRgRQRR@RRR-(RR_RRRRQRaR((RtsetAttributeNSs$
	


	

cCs|ii|S(N(RRRtattrname(RR((RRscCs|ii||fS(N(RRRR_Re(RR_Re((RRscCs|id|fjotiidn|ii|i	d}|dj	o|i|n|ii|i
|ifd}|dj	o||j	o|i|nt||||j	o|Sn||j	o|SndS(Nsattribute node already owned(RRRRR"R#tInuseAttributeErrRRRptold1tremoveAttributeNodeRR_Retold2t_set_attribute_node(RRRR((RRs
!


cCsGy|i|}Wn"tj
otiinX|i|dS(N(	RRRpRRNR"R#R+R(RRpR((RtremoveAttributes
cCsMy|i||f}Wn"tj
otiinX|i	|dS(N(
RRR_ReRRNR"R#R+R(RR_ReR((RtremoveAttributeNSs
cCs{|djotiiny|i|iWn"tj
otiinXt	||i
|i|_dS(N(R1RR"R#R+RRRpRNR-R:R@(RR1((RRs


cCs|ii|S(N(RRRRRp(RRp((RthasAttributescCs|ii||fS(N(RRRRR_Re(RR_Re((RthasAttributeNSscCst||tS(N(RsRRpR\(RRp((RtgetElementsByTagNamescCst|||tS(N(RuRR_ReR\(RR_Re((RtgetElementsByTagNameNSscCsd|it|fS(Ns<DOM Element: %s at %#x>(RRqR(R((RRsRc	Cs|i|d|i|i}|i}|i	x@|D]8}|id|t|||i|idqAW|i
o`|id|x+|i
D] }|i|||||qW|id||i|fn|id|dS(NRjs %s="s"s>%ss	%s</%s>%ss/>%s(RRmRRRqt_get_attributesRRta_namestsortta_nameRnRRRR1Rt	addindent(	RRRRRR1RRR((RRs 


!cCst|i|i|S(N(RRRR(R((RR5scCs|iotSntSdS(N(RRRR(R((Rt
hasAttributes8s
cCs |i|}|i|dS(N(RRRptidAttrtsetIdAttributeNode(RRpR((RtsetIdAttribute@scCs#|i||}|i|dS(N(RRR_ReRR(RR_ReR((RtsetIdAttributeNSDscCs|djp|i|iotiint|dj	otii	n|i
p<t|id<|i
d7_
|iid7_t|ndS(NRi(RRRRIRR"R#R+t_get_containing_entreftNoModificationAllowedErrRRRgRR@RR-(RR((RRHs!

(,R]R^RR<RRRyRRRR}R~R8R{R|R!RRwRGRR:RRRRRRRtsetAttributeNodeNSRRRtremoveAttributeNodeNSRRRRRRRRRRR(((RR}s@	*													
									Rzs*NamedNodeMap of attributes on the element.s%Namespace-local name of this element.cCsDt|||i|i<||i|i|if<||id<dS(NR(	R-telementRRRpRR_ReRg(RR((RRYs
t	ChildlesscBshtZdZeZeZeZeZdZ	dZ
dZdZdZ
dZdZRS(sMixin that makes childless-ness easy to implement and avoids
    the complexity of the Node methods that deal with children.
    cCsdS(N(R(R((RRnscCsdS(N(R(R((RRqscCstii|iddS(Ns nodes cannot have children(R"R#R$RRx(RR1((RR(tscCstS(N(R(R((RRxscCstii|iddS(Ns nodes do not have children(R"R#R$RRx(RRR ((RR{scCstii|iddS(Ns nodes do not have children(R"R#R+RRx(RR3((RR'scCstii|iddS(Ns nodes do not have children(R"R#R$RRx(RRR3((RR4s(R]R^RRRzt
EmptyNodeListRRbRdRRR(RRR'R4(((RRds							tProcessingInstructioncBsYtZeiZdZdZdZdZdZ	dZ
ddddZRS(	NcCs$||_|_||_|_dS(N(ttargetRRxR9Ry(RRR9((RRwscCs|iS(N(RR9(R((Rt	_get_datascCs|i}||d<|d<dS(NR9Ry(RRgRQR(RRRQ((Rt	_set_datas	cCs|iS(N(RR(R((Rt_get_targetscCs|i}||d<|d<dS(NRRx(RRgRQR(RRRQ((Rt_set_targets	cCs}|djp
|djo||id<|id<nD|djp
|djo||id<|id<n||i|<dS(NR9RyRRx(RpRRRg(RRpR((RRs
RcCs'|id||i|i|fdS(Ns
%s<?%s %s?>%s(RRmRRRR9R(RRRRR((RRs(R]R^RR}RRwRRRRRR(((RRs							t
CharacterDatacBsttZdZeZdZdZeZeZdZdZ	dZ
dZdZd	Z
d
ZRS(NcCs
t|iS(N(RRR9(R((RRscCs|idS(NR9(RRg(R((RRscCs|i}||d<|d<dS(NR9Ry(RRgRQR9(RR9RQ((RRs	cCsG|djp
|djo||id<|id<n||i|<dS(NR9Ry(RpRRRg(RRpR((RRscCsJ|i}t|djo
d}nd}d|ii|dd!|fS(Ni
s...Rs<DOM %s node "%s%s">i(RR9Rt	dotdotdott	__class__R](RR9R((RRs
	
cCs|djotiidn|t|ijotiidn|djotiidn|i|||!S(Nisoffset cannot be negatives#offset cannot be beyond end of datascount cannot be negative(toffsetR"R#tIndexSizeErrRRR9tcount(RRR((Rt
substringDatas

cCs|i||_dS(N(RR9targ(RR((Rt
appendDatascCs|djotiidn|t|ijotiidn|o(d|i| ||i|f|_ndS(Nisoffset cannot be negatives#offset cannot be beyond end of datas%s%s%s(RR"R#RRRR9R(RRR((Rt
insertDatas
cCs|djotiidn|t|ijotiidn|djotiidn|o#|i| |i|||_ndS(Nisoffset cannot be negatives#offset cannot be beyond end of datascount cannot be negative(RR"R#RRRR9R(RRR((Rt
deleteDatas

cCs|djotiidn|t|ijotiidn|djotiidn|o,d|i| ||i||f|_ndS(Nisoffset cannot be negatives#offset cannot be beyond end of datascount cannot be negatives%s%s%s(	RR"R#RRRR9RR(RRRR((RtreplaceDatas

(R]R^RRRRt_get_nodeValuet_set_nodeValueRRRR	R
RR(((RRs												
sLength of the string data.RcBsStZeiZdZdZdZddddZ	dZ
dZdZRS(Ns#textcCs|djp|t|ijotiidn|i}|i||_|i	|_	|i
}|ioK||ii
jo8|djo|ii|q|ii||n|i| |_|S(Nisillegal offset value(RRRR9R"R#RRtnewTextR@R/tnextR&RRR(R(RRRR((Rt	splitTexts#	
RcCs!t|d||i|fdS(Ns%s%s%s(RnRRRR9R(RRRRR((RR
scCs|ig}|i}xO|dj	oA|ititi	fjo |i
d|i|i}qPqW|i}xL|dj	o>|ititi	fjo|i|i|i}qsPqsWdi
|S(NiR(RR9R6R0RRRRR8R{R.R/R;tjoin(RR6R((Rt_get_wholeTexts 	

	

cCs|i}|i}xO|dj	oA|ititi	fjo |i}|i||}qPqW|i}|p|i|nxO|dj	oA|ititi	fjo |i}|i||}qPqW|o%|i}||d<||d<|SndSdS(NR9Ry(RR&RoR0RRRRR8R{RR'R/tcontentRgRQ(RRRQRoRR((RtreplaceWholeText!s2		
	

	
	

	

cCsn|iiotSnt|}|djotSn|ii|}|djotSn|i
SdS(N(RR9tstripRt_get_containing_elementRRR@RRtisElementContent(RRR((Rt!_get_isWhitespaceInElementContent?s

(
R]R^RR8RRxRRzRRRRR(((RRs				tisWhitespaceInElementContentsKTrue iff this text node contains only whitespace and is in element content.t	wholeTexts.The text of all logically-adjacent text nodes.cCsF|i}x6|dj	o(|itijo|Sn|i}qWdS(N(R1R&RRRRR<(R1R((RRRs	
cCsF|i}x6|dj	o(|itijo|Sn|i}qWdS(N(R1R&RRRRR|(R1R((RRZs	
tCommentcBs2tZeiZdZdZddddZRS(Ns#commentcCs||_|_dS(N(R9RRy(RR9((RRwgsRcCs!|id||i|fdS(Ns
%s<!--%s-->%s(RRmRRR9R(RRRRR((RRjs(R]R^RR~RRxRwR(((RRcs		tCDATASectioncBs)tZeiZdZddddZRS(Ns#cdata-sectionRcCsA|iiddjotdn|id|idS(Ns]]>is$']]>' not allowed in a CDATA sections<![CDATA[%s]]>(RR9tfindR*RRm(RRRRR((RRws(R]R^RR{RRxR(((RRns	tReadOnlySequentialNamedNodeMapcBstZdZfdZdZdZdZdZdZdZ	d	Z
d
ZdZdZ
d
ZdZRS(Nt_seqcCs
||_dS(N(tseqRR (RR!((RRwscCs
t|iS(N(RRR (R((RRscCs
t|iS(N(RRR (R((RRscCs0x)|iD]}|i|jo|Sq
q
WdS(N(RR RRxRp(RRpR((RRs
cCs@x9|iD].}|i|jo|i|jo|Sq
q
WdS(N(RR RR_Re(RR_ReR((RRs
 cCsPt|to|i|}n|i|}|djo
t|n|S(N(	Rt
name_or_tupleRRRR1RRRN(RR"R1((RRs

cCsB|djodSny|i|SWntj
odSnXdS(Ni(R)RRR R(RR)((RRs
cCstiiddS(Ns"NamedNodeMap instance is read-only(R"R#R(RRp((RRscCstiiddS(Ns"NamedNodeMap instance is read-only(R"R#R(RR_Re((RRscCstiiddS(Ns"NamedNodeMap instance is read-only(R"R#R(RR1((RRscCstiiddS(Ns"NamedNodeMap instance is read-only(R"R#R(RR1((RRscCs
|igS(N(RR (R((RRscCs|d|_dS(Ni(RRR (RR((RRs(s_seq(R]R^RRwRRRRRRRRRRRR(((RR}s												s&Number of entries in the NamedNodeMap.t
IdentifiedcBs)tZdZdZdZdZRS(s@Mix-in class that supports the publicId and systemId attributes.cCs||_||_dS(N(tpublicIdRtsystemId(RR$R%((Rt_identified_mixin_inits	cCs|iS(N(RR$(R((Rt
_get_publicIdscCs|iS(N(RR%(R((Rt
_get_systemIds(R]R^RR&R'R((((RR#s		tDocumentTypecBs\tZeiZdZdZdZdZ	dZ
dZdZdZ
ddddZRS(NcCsNt|_t|_|ot|\}}||_n|i|_	dS(N(
RRtentitiest	notationsRRRaRRpRx(RRRaR((RRws
cCs|iS(N(RtinternalSubset(R((Rt_get_internalSubsetscCsc|idjoKtd}|i|_|i|_tii	i
}|og|i
_g|i_xU|iiD]G}t|i|i|i}|iii||i|||qoWx|i
iD]q}t|i|i|i|i}|i|_|i|_|i|_|i
ii||i|||qWn|i||||SndSdS(N(RR@RR)tcloneRpRxR"R#tUserDataHandlertNODE_CLONEDRXR?R*R R+RtNotationR$R%tnotationR;R[tetEntitytnotationNametentitytactualEncodingRRE(RR?R3R2R.RRXR6((RRAs2

RcCs|id|i|i|io'|id||i||ifn)|io|id||ifn|idj	o.|id|i|i|idn|id|dS(Ns
<!DOCTYPE s%s  PUBLIC '%s'%s  '%s's%s  SYSTEM '%s's [t]Rk(	RRmRRpR$RR%R,R(RRRRR((RRs

'

(R]R^RtDOCUMENT_TYPE_NODERRRyRpR$R%R,RwR-RAR(((RR)s				R4cBswtZdZeiZdZdZdZ	dZ
dZdZdZ
dZdZdZdZdZRS(	NcCs2||_||_t|_|i||dS(N(
RpRRxR2R5R\RR&R$R%(RRpR$R%R2((RRws		cCs|iS(N(RR7(R((Rt_get_actualEncodingscCs|iS(N(RR(R((Rt
_get_encodingscCs|iS(N(RRE(R((Rt_get_version scCstiiddS(Ns(cannot append children to an entity node(R"R#R$(RR((RR(#scCstiiddS(Ns+cannot insert children below an entity node(R"R#R$(RRR ((RR'scCstiiddS(Ns*cannot remove children from an entity node(R"R#R$(RR3((RR'+scCstiiddS(Ns)cannot replace children of an entity node(R"R#R$(RRR3((RR4/s(R]R^RRzRtENTITY_NODERRyR7RRERwR:R;R<R(RR'R4(((RR4s								R1cBs tZeiZdZdZRS(NcCs||_|i||dS(N(RpRRxR&R$R%(RRpR$R%((RRw7s	(R]R^RRRRRyRw(((RR13s	tDOMImplementationcBsYtZdd
ddddddddg
ZdZdZd	Zd
ZdZRS(Ntcores1.0s2.0s3.0R"sls-loadcCs0|djo
d}n|i|f|ijS(NR(RERRDtlowerRt	_features(RRDRE((RRCIs

c	Cs_|o&|idj	otiidn|i}|djo|djo
|dj}|o|otiidn|ot
|\}}|djo#|djotiidn|o|otiidn|i||}|o|i|n|i|n|o||_|_n||_||_|S(Ns(doctype object owned by another DOM treesElement with no nameR"s$http://www.w3.org/XML/1998/namespacesillegal use of 'xml' prefixs(illegal use of prefix without namespaces(tdoctypeR&RR"R#tWrongDocumentErrRt_create_documentRcR_Rtadd_root_elementtInvalidCharacterErrRRaRRtcreateElementNSRR(R@RB(	RR_RRBRERcRaRR((RtcreateDocumentNs*'
		cCs"t|}||_||_|S(N(R)RRBR$R%(RRR$R%RB((RtcreateDocumentType{s		cCs#|i|do|SndSdS(N(RRCRDR(RRD((RRJscCstS(N(tDocument(R((RRDs(R?s1.0(R?s2.0(R?s3.0(R?N(sxmls1.0(sxmls2.0(sxmls3.0(sxmlN(sls-loads3.0(sls-loadN(	R]R^RRARCRHRIRJRD(((RR><s$		-		tElementInfocBsetZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZRS(sObject that represents content-model information for an element.

    This implementation is not expected to be used in practice; DOM
    builders should provide implementations which do the right thing
    using information available to it.

    RqcCs
||_dS(N(RpRRq(RRp((RRwscCstS(N(R(Rtaname((RRscCstS(N(R(RR_Re((RRscCstS(N(R(R((RRscCstS(sQReturns true iff this element is declared to have an EMPTY
        content model.N(R(R((RtisEmptyscCstS(s6Returns true iff the named attribte is a DTD-style ID.N(R(RRL((RRscCstS(s<Returns true iff the identified attribute is a DTD-style ID.N(R(RR_Re((RRscCs|iS(N(RRq(R((RRscCs
||_dS(N(RRRq(RR((RRs(stagName(
R]R^RRRwRRRRMRRRR(((RRKs								cCs^|itijo|iid|_n.t|o |i	iid|i	_ndS(N(
R1RRRt	_id_cachetclearRt_id_search_stackRhR@(R1((RR-s


RJcBstZeieieieifZeiZ	dZ
dZdZ
dZdZdZZeZdZdZdZdZeZdZdZdZdZdZdZdZ dZ!dZ"d	Z#d
Z$dZ%dZ&d
Z'dZ(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2dZ3dZ4dZ5dZ6dZ7dZ8dZ9d Z:d!Z;d"d"d"dd#Z<d$Z=RS(%Ns	#documenticCs+t|_h|_h|_d|_dS(N(R\RRt
_elem_infoRNRRP(R((RRws		cCs9|io|i|if}n
|i}|ii|S(N(RR_ReRLRqRRQR(RRRL((RRs
	cCs|iS(N(RR7(R((RR:scCs|iS(N(RRB(R((Rt_get_doctypescCs|iS(N(RtdocumentURI(R((Rt_get_documentURIscCs|iS(N(RR(R((RR;scCs|iS(N(RterrorHandler(R((Rt_get_errorHandlerscCs|iS(N(Rt
standalone(R((Rt_get_standalonescCs|iS(N(RtstrictErrorChecking(R((Rt_get_strictErrorCheckingscCs|iS(N(RRE(R((RR<scCs|i|ijo,tiidt|t|fn|idj	o|ii
|n|itijo#|i
otiidnti||S(Ns%s cannot be child of %ss two document elements disallowed(R1RRR!R"R#R$R%R&RR'RR<t_get_documentElementR((RR1((RR(s, cCssy|ii|Wn"tj
otiinXd|_	|_
d|_|i|jo
d|_n|S(N(
RRR5R3R*R"R#R+RR/R0R&tdocumentElement(RR3((RR's	
cCs3x,|iD]!}|itijo|Sq
q
WdS(N(RRR1RRR<(RR1((RR[s
cCs;|idj	o|iid|_nti|dS(N(RRBRR:R(R((RR:!s

cCs)|pdSn|iiddd}|i|_|i|_|i|_x|i	D]}t|||}|i
i|pt|i	i||itijo|idjptn8|itijo$|idjpt||_n||_qUW|itiii|||S(N(R?RRRBRHR.RRWRERRR>t
childcloneR@RItAssertionErrorR;RRRR\R9RBR&R[R"R#R/R0(RR?R.R]R((RRA's(



cCst}||_|S(N(RvRQRR@(RRQ((RtcreateDocumentFragment<s		cCst|}||_|S(N(RRqR3RR@(RRqR3((Rt
createElementAs	cCs<t|tp
tdnt}||_||_|S(Nsnode contents must be a string(RR9RRRttRR@(RR9Ra((RtcreateTextNodeFs
			cCs<t|tp
tdnt}||_||_|S(Nsnode contents must be a string(RR9RRRRRR@(RR9R((RtcreateCDATASectionNs
			cCst|}||_|S(N(RR9RRR@(RR9R((Rt
createCommentVs	cCst||}||_|S(N(RRR9tpRR@(RRR9Re((RtcreateProcessingInstruction[s	cCs"t|}||_d|_|S(NR(RRtaRR@R(RRRg((RtcreateAttribute`s		cCs1t|\}}t|||}||_|S(N(	RRRaReRR_R3RR@(RR_RR3RaRe((RRGfs	cCs=t|\}}t||||}||_d|_	|S(NR(
RRRaReRR_RgRR@R(RR_RRgRaRe((RtcreateAttributeNSls
		cCs"t||||}||_|S(N(R4RpR$R%R5R3RR@(RRpR$R%R5R3((Rt_create_entityvs	cCst|||}||_|S(N(R1RpR$R%RRR@(RRpR$R%R((Rt_create_notation{s	c	Cs|ii|o|i|Sn|ip|ipdSn|i}|djo|i	g}||_n|pdSnd}x|o|i}|i
g}|iD]!}|itjo||qq~|i|}|ox||iiD]}|ioZ|i|i|io=||i|i<|i|jo
|}qc|ipPqcqq|i|io=||i|i<|i|jo
|}q|ipPqq|ioC||i|i<|i|jo
|}q|idjoPqqqWna|ioVxS|iiD]>}|io.||i|i<|i|jo
|}qdq&q&Wn|dj	oPqqW|S(Ni( RRNRRRRQRRRPtstackR\tresulttpopR1textendt_[1]RR7RR,RRRzRRR_RReRRRRpR(	RRR1RRRlRpRmR7((RtgetElementByIds`	

?





	





cCst||tS(N(RsRRpR\(RRp((RRscCst|||tS(N(RuRR_ReR\(RR_Re((RRscCs|ii||S(N(RRBRCRDRE(RRDRE((RRFscCsb|itijotiidn*|itijotiidnt|||S(Nscannot import document nodess!cannot import document type nodes(R1RRRR"R#tNotSupportedErrR9R>R?R(RR1R?((Rt
importNodes
RcCsg|djo|id|n|id||fx'|iD]}|i||||qCWdS(Ns<?xml version="1.0" ?>s%<?xml version="1.0" encoding="%s"?>%s(RRRRmRRRR1RRR(RRRRRRR1((RRs

c	Cs|i|j	o#tiid||ifn|ititi	fjotii
dn|tjod|joR|idd\}}|djo)|tiijotiidq&q6|djo<|tiijo)|iti	jotiidnd}|}n
d}d}|iti	jo4|i}|dj	o|i}|i|qnd}|i}||d<||d	<||d
<||d<|itijo||d<nA||d
<|dj	o)|i||o|i|qn|S(Ns?cannot rename nodes from other documents;
expected %s,
found %ss8renameNode() only applies to element and attribute nodesRiRsillegal use of 'xmlns' prefixs$illegal use of the 'xmlns' attributeRaReR_RxRqRp(RR@RR"R#RCRRR<RRrR_RRpRRaReRRRRRRtis_idRRgRQRR(	RRR_RpRaRtReRRQ((Rt
renameNodesD#

 3
	
		






(>R]R^RR<R}R~R9R!RRRxRRyRzRBR&R0R/R>RBR7RRWRERRYRURSRRwRR:RRRTR;RVRXRZR<R(R'R[R:RAR_R`RbRcRdRfRhRGRiRjRkRqRRRFRsRRu(((RRJsd	
																									
			:				R\s#Top-level element of this document.c
Cs0|ii|otiii}ntiii	}|i
tijo|i
|i|i}xW|iiD]F}|i|i|i|i|i|i|i}	|i|	_qpW|o7x4|iD]%}
t|
||}|i|qWqn
|i
ti joN|i!}|o7x4|iD]%}
t|
||}|i|q,Wqn|i
ti"jo|i#|i$}n|i
ti%jo|i&|i$}nW|i
ti'jo|i(|i)|i$}n(|i
ti*jo|i+|i$}n|i
ti,jo1|i-|i|i}t.|_|i|_n|i
ti/jo|i|j	pt0tiii	}|i1i2|i3|i4|i5}||_|o0g|i6_7g|i8_7xr|i8i7D]d}t:|i|i4|i5}||_|i8i7i<|t=|do|i>|||qqWx|i6i7D]}t@|i|i4|i5|iA}|iC|_C|iD|_D|iE|_E||_|i6i7i<|t=|do|i>|||qOqOWqntiiFdtG|t=|do|i>|||n|S(so
    Clone a node and give it the new owner document.
    Called by Node.cloneNode and Document.importNode
    R[sCannot clone node %sN(HR1R@RItnewOwnerDocumentR"R#R/R0RXt
NODE_IMPORTEDRRR<RGR_RxR.RzRRRRRReRgRR?RR7R>RR(RR_R8RbR9R{RcR}RfRR~RdRRiRR9R^RBRIRpR$R%R*R R+RR1R2R;RUR[R3R4R5R6R7RRERrR%(
R1R?RvRR3RR2R.RRgR7RXR6((RR>s

	!	
	
	#cCs?|idd}t|djo|Snd|dfSdS(NRiii(RRtfieldsRR(RRx((RRcscCsdkl}|S(N(sStringIO(tStringIO(Ry((RR
ks
cCs<|||}|i\}}|i||i|S(N(	tfunctargstkwargsteventstgetEventttoktypetrootNodet
expandNodeRO(RzR{R|RRR}((Rt_do_pulldom_parseps


cCsl|djo&|odkl}|i|Sn6dkl}t|i|fhd|<d|<SdS(s3Parse a file into a DOM by filename or file object.(sexpatbuilder(spulldomtparsertbufsizeN(	RRRtxml.domtexpatbuildertparsetfiletpulldomR(RRRRR((RRws

cCs[|djodkl}|i|Sn-dkl}t|i|fhd|<SdS(s&Parse a file into a DOM from a string.(sexpatbuilder(spulldomRN(RRRRtparseStringtstringRR(RRRR((RRs


cCsj|o\t|toti|}nx6|D]*\}}tii	||pdSq1q1WntiS(N(tfeaturesRRtdomregt_parse_feature_stringtftvRJRBRCR(RRR((RtgetDOMImplementations(;RRR"RR`RRtxml.dom.minicompattxml.dom.xmlbuildertDOMImplementationLSt
DocumentLSttypeRR#RR<R|R,tGetattrMagictdefpropertyR2RhRnRsRuRvRtNewStyleRt
AttributeListRRRRRRRRRRRRRRR#R)R4R1R>RKR-RJR>RR
RRRR(/R
RRRRRR,RR>RR2R"RRJRuR1RhRRRsRRRR-RRRR#RRnRRRRRRRRRRR)R>R4RR`RKRv((Rt?s		
					u	
	
	
	$GZ	
	
			>	
<(	Q*	O	
	R			


Anon7 - 2021