MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /proc/self/root/usr/lib/python2.4/site-packages/_xmlplus/dom/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/lib/python2.4/site-packages/_xmlplus/dom/minidom.pyc
m
Ac@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
ZdZdZdZdZdZdZdZdZdZdZdZRS(NcCstS(N(tTrue(tself((t8/usr/lib/python2.4/site-packages/_xmlplus/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	
	cCstS(N(tFalse(R((Rt
hasAttributes@scCs|iotSntSdS(N(Rt
childNodesRR(R((Rt
hasChildNodesCs
cCs|iS(N(RR(R((Rt_get_childNodesIscCs|io|idSndS(Ni(RR(R((Rt_get_firstChildLs
cCs|io|idSndS(Ni(RR(R((Rt_get_lastChildPs
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*RR2((RR Ts6,
			
		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(R2RRRRRRR)R"R#R$R%R&R-R.R'RR(t
_append_childR0(RR2R((RR)ts,
	cCs|i|ijo*|i}|i||i||Sn|i|i	jo,t
iidt
|t
|fn|idj	o|ii|n||jodSny|ii|}Wn"tj
ot
iinX|itjp|itjot|n||i|<||_d|_|i|_|i|_d|_d|_|io||i_n|io||i_n|S(Ns%s cannot be child of %s(RRRRtoldChildR0R!R(R R"R#R$R%R&R'RRR*R+R,R-R.R1(RRR4R*R!((RtreplaceChilds8	
,
 
				

cCsy|ii|Wn"tj
otiinX|idj	o|i
|i_
n|i
dj	o|i|i
_nd|_|_
|itjot
|nd|_|S(N(RRtremoveR4R+R#R$R,R0RR1RR-R.R'(RR4((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_NODEtdataR2R0tunlinkR1RtappendtELEMENT_NODEt	normalize(RR2R7R8R:((RR>s2
	%

	
	
cCst|||ip|S(N(t_clone_nodeRtdeept
ownerDocument(RR@((Rt	cloneNodescCs|iii||S(N(RRAtimplementationt
hasFeaturetfeaturetversion(RRERF((RtisSupportedscCsdS(N(R(R((Rt_get_localNamescCs
||jS(N(Rtother(RRI((Rt
isSameNodescCs#|i|do|SndSdS(N(RRGRER(RRE((RtgetInterfacescCs7y|i|dSWnttfj
odSnXdS(Ni(Rt
_user_datatkeytAttributeErrortKeyErrorR(RRM((RtgetUserDatascCsd}y
|i}Wn"tj
oh}||_nX|i|o||d}n|djo"d}|dj	o||=qn||f||<|S(Ni(
RtoldRRLtdRNthas_keyRMR:thandler(RRMR:RTRQRR((RtsetUserDatas


cCsht|doTxQ|iiD]<\}\}}|dj	o|i|||||q q WndS(NRL(thasattrRRLtitemsRMR:RTRthandlet	operationtsrctdst(RRYRZR[RTRMR:((Rt_call_user_data_handlers

cCs^d|_|_|io.x|iD]}|iq$Wt|_nd|_d|_	dS(N(
RRR'RARR8R;tNodeListR1R0(RR8((RR;s

	( t__name__t
__module__RtnamespaceURIR'RAR0R1tEMPTY_PREFIXtprefixRR	RRRRRRR R)R5R(R>RBRGRHRJRKRPRUR\R;(((RR"s8							 		 		 					
			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(NiR1R0R'(RRtlastR2t__dict__R<(RR2RRg((RR3s	


cCs=x6|dj	o(|itijotSn|i}qWtS(N(R2RRRRRR'R(R2((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(R:treplaceRtwrite(RR:((Rt_write_data.scCsixb|iD]W}|itijo.|djp|i|jo|i	|nt
|||q
W|S(NR(tparentRR2RRR=tnamettagNametrcR<t_get_elements_by_tagName_helper(RpRqRsR2((RRt4s
0cCsx|iD]{}|itijob|djp|i|jo.|djp|i|jo|i
|nt||||q
q
W|S(NR(RpRR2RRR=RftnsURIR`RsR<t"_get_elements_by_tagName_ns_helper(RpRuRfRsR2((RRv<s
:tDocumentFragmentcBsbtZeiZdZdZdZdZ	ei
eieiei
eieieifZdZRS(Ns#document-fragmentcCst|_dS(N(R]RR(R((Rt__init__Ss(R^R_RRRtnodeNameRt	nodeValuet
attributesR'R=R9tCDATA_SECTION_NODEtENTITY_REFERENCE_NODEtPROCESSING_INSTRUCTION_NODEtCOMMENT_NODEt
NOTATION_NODER"Rx(((RRwEs	0tAttrcBstZeiZdZdZeZ	eZ
eieifZ
edddZdZdZdZdZdZdZdZd	Zd
ZRS(NcCsS|i}||d<|d<||d<||d<t|d<|iit	dS(NRyRqR`RbR(
RRhRRtqNameR`RbR]RR<tText(RRR`RfRbRR((RRx`s	


cCs|iidddS(Nt:ii(RRytsplit(R((RRHnscCs|iS(N(RRq(R((Rt	_get_nameqscCs|iS(N(Rt	specified(R((Rt_get_specifiedtscCs|i}|djoY||d<|d<|idi}||d<|d<|idj	ot	|iqnO|djo7||d<|d<|idj	ot	|iqn|||<dS(	NtvalueRziR:RqRy(svalues	nodeValue(snamesnodeName(
RRhRRRqRRtd2townerElementRR.(RRqRRRR((Rt__setattr__ws	

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 namespaceRbs%s:%sRyRq(RR`tnsuriRbtXMLNS_NAMESPACER#R$tNamespaceErrRhRRRRftnewNameRR.(RRbRRRR((Rt_set_prefixs	
	



cCsJ|i}||d<|d<|iot|in||id_dS(NRRzi(RRhRRRRR.RR:(RRRR((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_attrsRyt_attrsNSR`Rft_is_idRt_magic_id_nodesRAt_magic_id_countRR8R;(RRR8((RR;s	


	
cCs|iotSn|i}|i}|djp
|djotSn|i	|}|djotSn|io|i|i|i
Sn|i|iSdS(N(RRRRARdRRRRt_get_elem_infotinfoR`tisIdNSRftisIdRy(RRRdR((Rt	_get_isIds
		

cCs|i}|i}|djp
|djotSn|i|}|djotSn|i	o|i
|i	|iSn|i|i
SdS(N(RRARdRRRt_no_typeRRR`tgetAttributeTypeNSRftgetAttributeTypeRy(RRRdR((Rt_get_schemaTypes		

(R^R_RtATTRIBUTE_NODERRR{RRRRR9R}R"tEMPTY_NAMESPACERxRHRRRRRR;RR(((RRWs 									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((RRxs		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(R7RRtvaluesR2R<RyR(RR2R7((RRWs
cCsFg}x9|iiD](}|i|i|if|ifqW|S(N(	R7RRRR2R<R`RfR(RR2R7((RtitemsNSs
&cCs8t|to|ii|Sn|ii|SdS(N(t
isinstanceRMtStringTypesRRRSR(RRM((RRSscCs
|iiS(N(RRR(R((RRscCs
|iiS(N(RRR(R((RtkeysNSscCs
|iiS(N(RRR(R((RRscCs|ii||S(N(RRtgetRqR(RRqR((RRscCsA|it|ddjodSntt|t|SdS(NRi(RRtgetattrRIRtcmptid(RRI((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(
RRRRRtattnameR2RORRRAtsetNamedItemt	TypeError(RRRR2((Rt__setitem__s

cCs-y|i|SWntj
odSnXdS(N(RRRqROR(RRq((RtgetNamedItem&scCs3y|i||fSWntj
odSnXdS(N(RRR`RfROR(RR`Rf((RtgetNamedItemNS,scCs|i|}|dj	o\t|i|i|i=|i	|i
|if=|ii
dod|id<n|SntiidS(NR(RRRqtnRR.RRRyRR`RfRhRSR#R$R,(RRqR((RtremoveNamedItem2s


cCs|i||}|dj	o\t|i|i|i|if=|i	|i
=|iidod|id<n|Snt
iidS(NR(RRR`RfRRR.RRRRyRhRSR#R$R,(RR`RfR((RtremoveNamedItemNS>s


cCst|tp,tiidt|t|fn|ii	|i
}|o|i|i
i|_n||i|i
<||i|i|if<|i
|_t|i|S(Ns%s cannot be child of %s(RR2RR#R$R%R&RRRRqRQR;RRARR`RfRR.(RR2RQ((RRJs,

cCs
|i|S(N(RRR2(RR2((RtsetNamedItemNSXscCs%||}t|i|idS(N(RRR2R.RR;(RRR2((Rt__delitem__[s

cCs|i|i|ifS(N(RRRR(R((Rt__getstate__`scCs|\|_|_|_dS(N(tstateRRRR(RR((Rt__setstate__cs(s_attrss_attrsNSs
_ownerElement(R^R_t__doc__t	__slots__RxRRRWRRSRRRRRt__len__RRRRRRRRRRRR(((RRs2																				tlengths$Number of nodes in the NamedNodeMap.tTypeInfocBs2tZdZdZdZdZdZRS(Nt	namespaceRqcCs||_||_dS(N(RRRq(RRRq((RRxos	cCs4|iod|i
|i
fSn
d|i
SdS(Ns<TypeInfo %s (from %s)>s
<TypeInfo %s>(RRRq(R((Rt__repr__ss
cCs|iS(N(RRq(R((RRyscCs|iS(N(RR(R((Rt_get_namespace|s(s	namespacesname(R^R_RRxRRR(((RRls
			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(	RrRRyRbR`R]RRR(RRrR`RbRf((RRxs			cCs|iidddS(NRii(RRrR(R((RRHscCs|iS(N(RRr(R((Rt_get_tagNamescCsGx!|iiD]}|iqWd|_d|_ti|dS(N(RRRtattrR;RRR(RR((RR;s		cCs0y|i|iSWntj
odSnXdS(NR(RRRRRO(RR((RtgetAttributescCs6y|i||fiSWntj
odSnXdS(NR(RRR`RfRRO(RR`Rf((RtgetAttributeNSscCs|i|}|djoEt|}|i}||d<|d<|i	|d<|i
|nH||ijo7|i}||d<|d<|iot|qndS(NRRzRA(
RtgetAttributeNodeRRRRRhRRRRAtsetAttributeNodeRR.(RRRRRR((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(NRbRyRRzRA(t_nssplitt
qualifiedNameRbt	localnameRtgetAttributeNodeNSR`RRRRhRRRRARRR.(RR`RRRRRRbR((RtsetAttributeNSs$
	


	

cCs|ii|S(N(RRRtattrname(RR((RRscCs|ii||fS(N(RRRR`Rf(RR`Rf((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$tInuseAttributeErrRRRqtold1tremoveAttributeNodeRR`Rftold2t_set_attribute_node(RRRR((RRs
!


cCsGy|i|}Wn"tj
otiinX|i|dS(N(	RRRqRROR#R$R,R(RRqR((RtremoveAttributes
cCsMy|i||f}Wn"tj
otiinX|i	|dS(N(
RRR`RfRROR#R$R,R(RR`RfR((RtremoveAttributeNSs
cCs{|djotiiny|i|iWn"tj
otiinXt	||i
|i|_|S(N(R2RR#R$R,RRRqROR.R;RA(RR2((RRs


cCs|ii|S(N(RRRSRq(RRq((RthasAttributescCs|ii||fS(N(RRRSR`Rf(RR`Rf((RthasAttributeNSscCst||tS(N(RtRRqR](RRq((RtgetElementsByTagNamescCst|||tS(N(RvRR`RfR](RR`Rf((RtgetElementsByTagNameNSscCsd|it|fS(Ns<DOM Element: %s at %#x>(RRrR(R((RR!sRc	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(NRks %s="s"s>%ss	%s</%s>%ss/>%s(RRnRRRrt_get_attributesRRta_namestsortta_nameRoRRRR2Rt	addindent(	RRRRRR2RRR((RR$s 


!cCst|i|i|S(N(RRRR(R((RR:scCs|iotSntSdS(N(RRRR(R((RR=s
cCs |i|}|i|dS(N(RRRqtidAttrtsetIdAttributeNode(RRqR((RtsetIdAttributeEscCs#|i||}|i|dS(N(RRR`RfRR(RR`RfR((RtsetIdAttributeNSIscCs|djp|i|iotiint|dj	otii	n|i
p<t|id<|i
d7_
|iid7_t|ndS(NRi(RRRRJRR#R$R,t_get_containing_entreftNoModificationAllowedErrRRRhRRARR.(RR((RRMs!

(,R^R_RR=RRRzRRRR~RR9R|R}R"RRxRHRR;RRRRRRRtsetAttributeNodeNSRRRtremoveAttributeNodeNSRRRRRRRRRRR(((RRs@	*																						R{s*NamedNodeMap of attributes on the element.s%Namespace-local name of this element.cCsDt|||i|i<||i|i|if<||id<dS(NR(	R.telementRRRqRR`RfRh(RR((RR^s
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((RRsscCsdS(N(R(R((RRvscCstii|iddS(Ns nodes cannot have children(R#R$R%RRy(RR2((RR)yscCstS(N(R(R((RR}scCstii|iddS(Ns nodes do not have children(R#R$R%RRy(RRR!((RR scCstii|iddS(Ns nodes do not have children(R#R$R,RRy(RR4((RR(scCstii|iddS(Ns nodes do not have children(R#R$R%RRy(RRR4((RR5s(R^R_RRR{t
EmptyNodeListRRcReRRR)RR R(R5(((RRis							tProcessingInstructioncBsYtZeiZdZdZdZdZdZ	dZ
ddddZRS(	NcCs$||_|_||_|_dS(N(ttargetRRyR:Rz(RRR:((RRxscCs|iS(N(RR:(R((Rt	_get_datascCs|i}||d<|d<dS(NR:Rz(RRhRRR(RRRR((Rt	_set_datas	cCs|iS(N(RR(R((Rt_get_targetscCs|i}||d<|d<dS(NRRy(RRhRRR(RRRR((Rt_set_targets	cCs}|djp
|djo||id<|id<nD|djp
|djo||id<|id<n||i|<dS(NR:RzRRy(RqRRRh(RRqR((RRs
RcCs'|id||i|i|fdS(Ns
%s<?%s %s?>%s(RRnRRRR:R(RRRRR((RRs(R^R_RR~RRxRRRRRR(((RRs							t
CharacterDatacBsttZdZeZdZdZeZeZdZdZ	dZ
dZdZd	Z
d
ZRS(NcCs
t|iS(N(RRR:(R((RRscCs|idS(NR:(RRh(R((RRscCs|i}||d<|d<dS(NR:Rz(RRhRRR:(RR:RR((RRs	cCsG|djp
|djo||id<|id<n||i|<dS(NR:Rz(RqRRRh(RRqR((RRscCsJ|i}t|djo
d}nd}d|ii|dd!|fS(Ni
s...Rs<DOM %s node "%s%s">i(RR:Rt	dotdotdott	__class__R^(RR:R((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IndexSizeErrRRR:tcount(RRR((Rt
substringDatas

cCs|i||_dS(N(RR:targ(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$RRRR:R(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$RRRR:R(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$RRRR:RR(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(RRRR:R#R$RRtnewTextRAR0tnextR'RRR)R (RRRR((Rt	splitTexts#	
RcCs!t|d||i|fdS(Ns%s%s%s(RoRRRR:R(RRRRR((RRscCs|ig}|i}xO|dj	oA|ititi	fjo |i
d|i|i}qPqW|i}xL|dj	o>|ititi	fjo|i|i|i}qsPqsWdi
|S(NiR(RR:R7R1RRRRR9R|R/R0R<tjoin(RR7R((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(NR:Rz(RR'RpR1RRRRR9R|RR(R0tcontentRhRR(RRRRRpRR((RtreplaceWholeText(s2		
	

	
	

	

cCsn|iiotSnt|}|djotSn|ii|}|djotSn|i
SdS(N(RR:tstripRt_get_containing_elementRRRARRtisElementContent(RRR((Rt!_get_isWhitespaceInElementContentFs

(
R^R_RR9RRyRR{RRRRR(((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(R2R'RRRRR=(R2R((RRYs	
cCsF|i}x6|dj	o(|itijo|Sn|i}qWdS(N(R2R'RRRRR}(R2R((RRas	
tCommentcBs2tZeiZdZdZddddZRS(Ns#commentcCs||_|_dS(N(R:RRz(RR:((RRxnsRcCs!|id||i|fdS(Ns
%s<!--%s-->%s(RRnRRR:R(RRRRR((RRqs(R^R_RRRRyRxR(((RRjs		tCDATASectioncBs)tZeiZdZddddZRS(Ns#cdata-sectionRcCsA|iiddjotdn|id|idS(Ns]]>is$']]>' not allowed in a CDATA sections<![CDATA[%s]]>(RR:tfindR+RRn(RRRRR((RRys(R^R_RR|RRyR(((RRus	tReadOnlySequentialNamedNodeMapcBstZdZfdZdZdZdZdZdZdZ	d	Z
d
ZdZdZ
d
ZdZRS(Nt_seqcCs
||_dS(N(tseqRR (RR!((RRxscCs
t|iS(N(RRR (R((RRscCs
t|iS(N(RRR (R((RRscCs0x)|iD]}|i|jo|Sq
q
WdS(N(RR RRyRq(RRqR((RRs
cCs@x9|iD].}|i|jo|i|jo|Sq
q
WdS(N(RR RR`Rf(RR`RfR((RRs
 cCsPt|to|i|}n|i|}|djo
t|n|S(N(	Rt
name_or_tupleRRRR2RRRO(RR"R2((RRs

cCsB|djodSny|i|SWntj
odSnXdS(Ni(R*RRR R(RR*((RRs
cCstiiddS(Ns"NamedNodeMap instance is read-only(R#R$R(RRq((RRscCstiiddS(Ns"NamedNodeMap instance is read-only(R#R$R(RR`Rf((RRscCstiiddS(Ns"NamedNodeMap instance is read-only(R#R$R(RR2((RRscCstiiddS(Ns"NamedNodeMap instance is read-only(R#R$R(RR2((RRscCs
|igS(N(RR (R((RRscCs+t|djpt|d|_dS(Nii(RRtAssertionErrorRR (RR((RRs(s_seq(R^R_RRxRRRRRRRRRRRR(((RRs												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	notationsRRRbRRqRy(RRRbR((RRxs
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(RRARR*tcloneRqRyR#R$tUserDataHandlertNODE_CLONEDRYR@R+R R,RtNotationR%R&tnotationR<R\tetEntitytnotationNametentitytactualEncodingRRF(RR@R4R3R/RRYR7((RRBs2

RcCs|id|i|i|io!|id|i|ifn#|io|id|in|idj	o.|id|i|i|idn|iddS(Ns
<!DOCTYPE s
  PUBLIC '%s'
  '%s's
  SYSTEM '%s's [t]s>
(RRnRRqR%R&R-R(RRRRR((RRs

!

(R^R_RtDOCUMENT_TYPE_NODERRRzRqR%R&R-RxR.RBR(((RR*s				R5cBswtZdZeiZdZdZdZ	dZ
dZdZdZ
dZdZdZdZdZRS(	NcCs2||_||_t|_|i||dS(N(
RqRRyR3R6R]RR'R%R&(RRqR%R&R3((RRxs		cCs|iS(N(RR8(R((Rt_get_actualEncodingscCs|iS(N(RR(R((Rt
_get_encodingscCs|iS(N(RRF(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%(RR4((RR(+scCstiiddS(Ns)cannot replace children of an entity node(R#R$R%(RRR4((RR5/s(R^R_RR{RtENTITY_NODERRzR8RRFRxR;R<R=R)R R(R5(((RR5s								R2cBs tZeiZdZdZRS(NcCs||_|i||dS(N(RqRRyR'R%R&(RRqR%R&((RRx7s	(R^R_RRRRRzRx(((RR23s	tDOMImplementationcBsYtZdd
ddddddddg
ZdZdZd	Zd
ZdZRS(Ntcores1.0s2.0s3.0R#sls-loadcCs0|djo
d}n|i|f|ijS(NR(RFRREtlowerRt	_features(RRERF((RRDIs

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_documentRdR`Rtadd_root_elementtInvalidCharacterErrRRbRRtcreateElementNSRR)RARC(	RR`RRCRFRdRbRR((RtcreateDocumentNs*'
		cCs"t|}||_||_|S(N(R*RRCR%R&(RRR%R&RC((RtcreateDocumentType{s		cCs#|i|do|SndSdS(N(RRDRER(RRE((RRKscCstS(N(tDocument(R((RREs(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RBRDRIRJRKRE(((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.

    RrcCs
||_dS(N(RqRRr(RRq((RRxscCstS(N(R(Rtaname((RRscCstS(N(R(RR`Rf((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(RRM((RRscCstS(s<Returns true iff the identified attribute is a DTD-style ID.N(R(RR`Rf((RRscCs|iS(N(RRr(R((RRscCs
||_dS(N(RRRr(RR((RRs(stagName(
R^R_RRRxRRRRNRRRR(((RRLs								cCs^|itijo|iid|_n.t|o |i	iid|i	_ndS(N(
R2RRRt	_id_cachetclearRt_id_search_stackRiRA(R2((RR.s


RKcBstZeieieieifZeiZ	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_infoRORRQ(R((RRxs		cCs9|io|i|if}n
|i}|ii|S(N(RR`RfRMRrRRRR(RRRM((RRs
	cCs|iS(N(RR8(R((RR;scCs|iS(N(RRC(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(RRF(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(R2RRR"R#R$R%R&R'RR(RR=t_get_documentElementR)(RR2((RR)s, cCssy|ii|Wn"tj
otiinXd|_	|_
d|_|i|jo
d|_n|S(N(
RRR6R4R+R#R$R,RR0R1R'tdocumentElement(RR4((RR(s	
cCs3x,|iD]!}|itijo|Sq
q
WdS(N(RRR2RRR=(RR2((RR\s
cCs;|idj	o|iid|_nti|dS(N(RRCR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RRCRIR/RRXRFRRR?t
childcloneRARJR#R<RRRR]R:RCR'R\R#R$R0R1(RR@R/R^R((RRB's(



cCst}||_|S(N(RwRRRRA(RRR((RtcreateDocumentFragment<s		cCst|}||_|S(N(RRrR4RRA(RRrR4((Rt
createElementAs	cCs<t|tp
tdnt}||_||_|S(Nsnode contents must be a string(RR:RRRttRRA(RR:Ra((RtcreateTextNodeFs
			cCs<t|tp
tdnt}||_||_|S(Nsnode contents must be a string(RR:RRRRRRA(RR:R((RtcreateCDATASectionNs
			cCst|}||_|S(N(RR:RRRA(RR:R((Rt
createCommentVs	cCst||}||_|S(N(RRR:tpRRA(RRR:Re((RtcreateProcessingInstruction[s	cCs"t|}||_d|_|S(NR(RRtaRRAR(RRRg((RtcreateAttribute`s		cCs1t|\}}t|||}||_|S(N(	RRRbRfRR`R4RRA(RR`RR4RbRf((RRHfs	cCs=t|\}}t||||}||_d|_	|S(NR(
RRRbRfRR`RgRRAR(RR`RRgRbRf((RtcreateAttributeNSls
		cCs"t||||}||_|S(N(R5RqR%R&R6R4RRA(RRqR%R&R6R4((Rt_create_entityvs	cCst|||}||_|S(N(R2RqR%R&RRRA(RRqR%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( RRORSRRRRRRQtstackR]tresulttpopR2textendt_[1]RR8RR-RRR{RRR`RRfRRRRqR(	RRR2RRRlRpRmR8((RtgetElementByIds`	

?





	





cCst||tS(N(RtRRqR](RRq((RRscCst|||tS(N(RvRR`RfR](RR`Rf((RRscCs|ii||S(N(RRCRDRERF(RRERF((RRGscCsb|itijotiidn*|itijotiidnt|||S(Nscannot import document nodess!cannot import document type nodes(R2RRRR#R$tNotSupportedErrR:R?R@R(RR2R@((Rt
importNodes
RcCs]|djo|idn|id|x'|iD]}|i||||q9WdS(Ns<?xml version="1.0" ?>
s$<?xml version="1.0" encoding="%s"?>
(RRRRnRRR2RRRR(RRRRRRR2((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' attributeRbRfR`RyRrRq(RRARR#R$RDRRR=RRrR`RRqRRbRfRRRRRRtis_idRRhRRRR(	RRR`RqRbRtRfRRR((Rt
renameNodesD#

 3
	
		






(>R^R_RR=R~RR:R"RRRyRRzR{RCR'R1R0R?RCR8RRXRFRRZRVRTRRxRR;RSRUR<RWRYR[R=R)R(R\R;RBR_R`RbRcRdRfRhRHRiRjRkRqRRRGRsRRu(((RRKsd	
																									
			:				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(HR2RARJtnewOwnerDocumentR#R$R0R1RYt
NODE_IMPORTEDRRR=RHR`RyR/R{RRRRRRfRgRR@RR8R?RR)RR_R9RbR:R|RcR~RfRRRdRRiRR:R#RCRJRqR%R&R+R R,RR2R3R<RVR\R4R5R6R7R8RRFRrR&(
R2R@RvRR4RR3R/RRgR8RYR7((RR?s

	!	
	
	#cCs?|idd}t|djo|Snd|dfSdS(NRiii(RRtfieldsRR(RRx((RRcscCsdkl}|S(N(sStringIO(tStringIO(Ry((RR
ks
cCs?t|||}|i\}}|i||i	|S(N(
tapplytfunctargstkwargsteventstgetEventttoktypetrootNodet
expandNodeRP(R{R|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_stringtftvRKRCRDR(RRR((RtgetDOMImplementations(;RRR#RRaRRtxml.dom.minicompattxml.dom.xmlbuildertDOMImplementationLSt
DocumentLSttypeRR$RR=R}R-tGetattrMagictdefpropertyR3RiRoRtRvRwRtNewStyleRt
AttributeListRRRRRRRRRRRRRRR$R*R5R2R?RLR.RKR?RR
RRRR(/R
RRRRRR-RR?RR3R#RRKRvR2RiRRRtRRRR.RRRR$RRoRRRRRRRRRRR*R?R5RRaRLRw((Rt?s		
					u	
	
	
	$G\	
	
			
?	

<(	Q*	O	
	R			


Anon7 - 2021