Pc@s2dddddddddd d d d d dddddddgZdZddlZddlZddlZdefdYZyddlmZWne k reZnXd e fdYZ dZ defdYZ e ZZidZed Zed!ZeZd efd"YZdefd#YZed$Zd%Zd&d'd(d)d*d+d,d-d.d/d0d1f ZyeeZWnek rnXd2Zd3Zied46ed56ed66Zd7Zid4d86d5d96d:d;6d<d=6d>d?6d@dA6dBdC6Z dDZ!dEZ"dFZ#dGZ$dHZ%eedIZ&eedJZ'dKZ(edLZ)eedMZ*dNefdOYZ+edPZ,edQZ-e,Z.edRZ/defdSYZ0defdTYZ1e1Z2yddUl3m4Z4e4edV(treprRtid(R((s&..\python\lib\xml\etree\ElementTree.pyt__repr__scCs|j||S(N(t __class__(RRR,((s&..\python\lib\xml\etree\ElementTree.pyt makeelementscCs;|j|j|j}|j|_|j|_||(|S(N(R4RR,Rttail(RR((s&..\python\lib\xml\etree\ElementTree.pyR*s   cCs t|jS(N(tlenR-(R((s&..\python\lib\xml\etree\ElementTree.pyt__len__scCs)tjdtddt|jdkS(NsyThe behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.t stacklevelii(twarningstwarnt FutureWarningR6R-(R((s&..\python\lib\xml\etree\ElementTree.pyt __nonzero__s cCs |j|S(N(R-(Rtindex((s&..\python\lib\xml\etree\ElementTree.pyt __getitem__ scCs||j||D]6}x|jD] }|VqWW|jrD|jVqDqDWdS(N(RR(t basestringRRtitertextR5(RRRQts((s&..\python\lib\xml\etree\ElementTree.pyRUs      N(!R%R&RRR,RR5R/R2R4R*R7R<R>R?R@RARBRDRERGRR R$R"RIRJRMRNROR!RSRU(((s&..\python\lib\xml\etree\ElementTree.pyRs<             cKs<|j}|j||j||}|j||S(N(R*R+R4RA(tparentRR,R.R((s&..\python\lib\xml\etree\ElementTree.pyR s    cCstt}||_|S(N(RRR(RR((s&..\python\lib\xml\etree\ElementTree.pyR"s  cCs6tt}||_|r2|jd||_n|S(Nt (RR R(ttargetRR((s&..\python\lib\xml\etree\ElementTree.pyR 1s   cBs/eZddZdZdZdZRS(cCs&|rd||f}n||_dS(Ns{%s}%s(R(Rt text_or_uriR((s&..\python\lib\xml\etree\ElementTree.pyR/EscCs|jS(N(R(R((s&..\python\lib\xml\etree\ElementTree.pyt__str__IscCs t|jS(N(thashR(R((s&..\python\lib\xml\etree\ElementTree.pyt__hash__KscCs2t|tr"t|j|jSt|j|S(N(R(R tcmpR(Rtother((s&..\python\lib\xml\etree\ElementTree.pyt__cmp__MsN(R%R&RR/R[R]R`(((s&..\python\lib\xml\etree\ElementTree.pyR Ds   cBseZd d dZdZdZd dZd dZd dZd dZ d d dZ d dZ d d Z d d d d d Z d ZRS( cCs#||_|r|j|ndS(N(t_rootR(RRtfile((s&..\python\lib\xml\etree\ElementTree.pyR/_s cCs|jS(N(Ra(R((s&..\python\lib\xml\etree\ElementTree.pytgetrootkscCs ||_dS(N(Ra(RR((s&..\python\lib\xml\etree\ElementTree.pyt_setrootuscCs~t|ds!t|d}n|s<tdt}nx)|jd}|sXPn|j|q?|j|_|jS(NtreadtrbRYi(R)topenRRRetfeedtcloseRa(Rtsourcetparsertdata((s&..\python\lib\xml\etree\ElementTree.pyRscCs|jj|S(N(RaR!(RR((s&..\python\lib\xml\etree\ElementTree.pyR!scCs)tjdtddt|j|S(NsbThis method will be removed in future versions. Use 'tree.iter()' or 'list(tree.iter())' instead.R8i(R9R:RRR#R!(RR((s&..\python\lib\xml\etree\ElementTree.pyRSs cCsJ|d dkr7d|}tjd|tddn|jj||S(Nit/t.sThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rR8i(R9R:R;RaR(RRHR((s&..\python\lib\xml\etree\ElementTree.pyRs cCsM|d dkr7d|}tjd|tddn|jj|||S(NiRmRnsThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rR8i(R9R:R;RaR (RRHRR((s&..\python\lib\xml\etree\ElementTree.pyR s cCsJ|d dkr7d|}tjd|tddn|jj||S(NiRmRnsThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rR8i(R9R:R;RaR$(RRHR((s&..\python\lib\xml\etree\ElementTree.pyR$s cCsJ|d dkr7d|}tjd|tddn|jj||S(NiRmRnsThis search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to %rR8i(R9R:R;RaR"(RRHR((s&..\python\lib\xml\etree\ElementTree.pyR"s c Cs=|sd}n|tkr.td|nt|drF|}nt|d}|j}|s|dkryd}qd}n>|s|dkr|d kr|dkr|d|qn|d krt||j|n>t|j||\}} t|} | ||j||| ||k r9|j ndS( Ntxmlsunknown method %rtwritetwbtc14nsutf-8sus-asciis$ R(sutf-8sus-ascii( t _serializet ValueErrorR)RgRpRt_serialize_textRat _namespacesRi( Rtfile_or_filenametencodingtxml_declarationtdefault_namespacetmethodRbRptqnamesRt serialize((s&..\python\lib\xml\etree\ElementTree.pyRps0            cCs|j|ddS(NR{Rr(Rp(RRb((s&..\python\lib\xml\etree\ElementTree.pyt write_c14n3sN(R%R&RR/RcRdRR!RSRR R$R"RpR~(((s&..\python\lib\xml\etree\ElementTree.pyR]s        c sidd6ir&d       $     c Css|j}|j}|tkr8|dt||n|tkr^|dt||n||}|dkr|r|t||nx|D]}t||||dqWn|d||j}|s|r|rNxet |jddD]E\} } | r!d| } n|d| j |t | |fqWnx~t |D]m\} } t | t r| j} nt | t r|| j} nt | |} |d|| | fq[Wn|st|rC|d |r|t||nx$|D]}t||||dqW|d |d n |d |jro|t|j|ndS( Ns stst:s xmlns%s="%s"s %s="%s"t>s(RRRt_encodeR Rt _escape_cdatat_serialize_xmlROtsortedRt_escape_attribR(R R6R5( RpRRxR|RRRRQROtvtk((s&..\python\lib\xml\etree\ElementTree.pyR~sP                tareatbasetbasefonttbrtcoltframethrtimgtinputtisindextlinkt metaparamc Cs|j}|j}|tkr8|dt||n?|tkr^|dt||n||}|dkr|r|t||nx|D]}t||||dqWn|d||j}|s|r|rNxet|jddD]E\} } | r!d| } n|d| j |t | |fqWnx~t|D]m\} } t | t r| j} nt | t r|| j} nt | |} |d|| | fq[Wn|d |j}|r/|d ks|d kr|t||q/|t||nx$|D]}t||||dq6W|tkrw|d |d n|jr|t|j|ndS( Ns sRRKcSs|dS(Ni((R((s&..\python\lib\xml\etree\ElementTree.pyRsRs xmlns%s="%s"s %s="%s"Rtscripttstyles;s       U      D /  2           Q   Z