lJc@s}dddddddddd d d d d ddddgZddkZddkZddkZdfdYZyddkZWnej oeZnXdZdfdYZeZ hdZ hdZ e dZ e dZeZd fdYZdfdYZdZd Zd!Zeid" d#joeid$Zneied%Zhd&d'<d(d)<d*d+<d,d-Z$e#Z%e d?Z&d fd@YZ'dfdAYZ(e(Z)dS(BtCommenttdumptElementt ElementTreet fromstringt iselementt iterparsetparsetPItProcessingInstructiontQNamet SubElementttostringt TreeBuildertVERSIONtXMLt XMLParsertXMLTreeBuilderiNt_SimpleElementPathcBs&eZdZddZdZRS(cCs-x&|D]}|i|jo|SqqWdS(N(ttagtNone(tselftelementRtelem((s(/sys/lib/python/xml/etree/ElementTree.pytfindts  cCs7x0|D](}|i|jo|ipdSqqW|S(Nt(Rttext(RRRtdefaultR((s(/sys/lib/python/xml/etree/ElementTree.pytfindtextys cCsb|d djo|i|dSng}x/|D]'}|i|jo|i|q3q3W|S(Nis.//(t getiteratorRtappend(RRRtresultR((s(/sys/lib/python/xml/etree/ElementTree.pytfindall~sN(t__name__t __module__RRRR (((s(/sys/lib/python/xml/etree/ElementTree.pyRrs  s1.2.6t_ElementInterfacecBseZdZdZdZdZdZdZdZ dZ dZ dZ dZ dZdZd Zd Zd Zd Zd ZdZddZdZdZddZdZdZdZddZRS(cCs||_||_g|_dS(N(Rtattribt _children(RRR$((s(/sys/lib/python/xml/etree/ElementTree.pyt__init__s  cCsd|it|fS(Ns(Rtid(R((s(/sys/lib/python/xml/etree/ElementTree.pyt__repr__scCs t||S(N(R(RRR$((s(/sys/lib/python/xml/etree/ElementTree.pyt makeelementscCs t|iS(N(tlenR%(R((s(/sys/lib/python/xml/etree/ElementTree.pyt__len__scCs |i|S(N(R%(Rtindex((s(/sys/lib/python/xml/etree/ElementTree.pyt __getitem__scCs%t|pt||i|R&R(R)R+R-R/R0R3R6R7RR8R9R:RRR R=R?RBRCRDR(((s(/sys/lib/python/xml/etree/ElementTree.pyR#s6       cKs&|i}|i|t||S(N(tcopytupdateR#(RR$textra((s(/sys/lib/python/xml/etree/ElementTree.pyRs  cKs<|i}|i||i||}|i||S(N(RIRJR)R(tparentRR$RKR((s(/sys/lib/python/xml/etree/ElementTree.pyR s    cCstt}||_|S(N(RRR(RR((s(/sys/lib/python/xml/etree/ElementTree.pyRs  cCs8tt}||_|o|id||_n|S(Nt (RR R(ttargetRR((s(/sys/lib/python/xml/etree/ElementTree.pyR s   cBs/eZddZdZdZdZRS(cCs(|od||f}n||_dS(Ns{%s}%s(R(Rt text_or_uriR((s(/sys/lib/python/xml/etree/ElementTree.pyR&scCs|iS(N(R(R((s(/sys/lib/python/xml/etree/ElementTree.pyt__str__ scCs t|iS(N(thashR(R((s(/sys/lib/python/xml/etree/ElementTree.pyt__hash__ scCs7t|tot|i|iSnt|i|S(N(t isinstanceR tcmpR(Rtother((s(/sys/lib/python/xml/etree/ElementTree.pyt__cmp__sN(R!R"RR&RPRRRV(((s(/sys/lib/python/xml/etree/ElementTree.pyR s   cBsteZd d dZdZdZd dZd dZdZd dZ dZ dd Z d Z RS( cCsF|djpt|pt||_|o|i|ndS(N(RRR.t_rootR(RRtfile((s(/sys/lib/python/xml/etree/ElementTree.pyR&s! cCs|iS(N(RW(R((s(/sys/lib/python/xml/etree/ElementTree.pytgetroot*scCs!t|pt||_dS(N(RR.RW(RR((s(/sys/lib/python/xml/etree/ElementTree.pyt_setroot4scCs{t|dpt|d}n|p t}nx+|id}|pPn|i|q:|i|_|iS(Ntreadtrbi(thasattrtopenRR[tfeedtcloseRW(Rtsourcetparsertdata((s(/sys/lib/python/xml/etree/ElementTree.pyRAs cCs'|idj pt|ii|S(N(RWRR.R(RR((s(/sys/lib/python/xml/etree/ElementTree.pyRVscCsF|idj pt|d djod|}n|ii|S(Nit/t.(RWRR.R(RR<((s(/sys/lib/python/xml/etree/ElementTree.pyRbscCsI|idj pt|d djod|}n|ii||S(NiRdRe(RWRR.R(RR<R((s(/sys/lib/python/xml/etree/ElementTree.pyRtscCsF|idj pt|d djod|}n|ii|S(NiRdRe(RWRR.R (RR<((s(/sys/lib/python/xml/etree/ElementTree.pyR ssus-asciicCs|idj ptt|dpt|d}n|p d}n0|djo"|djo|id|n|i||i|hdS(Ntwritetwbsus-asciisutf-8s$ (RWRR.R]R^Rft_write(RRXtencoding((s(/sys/lib/python/xml/etree/ElementTree.pyRfs c Csh|i}|tjo!|idt|i|n|tjo!|idt|i|n|i}g}yVt|tp|d djo1t ||\}}|o|i |qnWnt j ot |nX|idt |||p|oi|ix|D]\} } yVt| tp| d djo1t | |\} }|o|i |qnWnt j ot | nXyEt| to1t | |\} }|o|i |qnWnt j ot | nX|idt | |t| |fq&WxA|D]5\} } |idt | |t| |fqAWn|ip t|o}|id|io|it|i|nx$|D]} |i|| ||qW|idt ||dn|id x|D]\} } || =q&W|io|it|i|ndS( Ns sit{ts(RRRft _escape_cdataRR RDRSR tfixtagRt TypeErrort_raise_serialization_errort_encodetsortt_escape_attribR*RhR>( RRXRHRit namespacesRRDt xmlns_itemstxmlnstktvtn((s(/sys/lib/python/xml/etree/ElementTree.pyRhsd  ! ! !   !     "    N( R!R"RR&RYRZRRRRR RfRh(((s(/sys/lib/python/xml/etree/ElementTree.pyRs    cCst|tp t|dS(NR(RSR#R](R((s(/sys/lib/python/xml/etree/ElementTree.pyRscCspt|tpt|}n|iti|ii}| p|ddjotiidndS(Nis (RSRRftsyststdoutRYR>(RR>((s(/sys/lib/python/xml/etree/ElementTree.pyRs cCs/y|i|SWntj o |SnXdS(N(tencodetAttributeError(tsRi((s(/sys/lib/python/xml/etree/ElementTree.pyRqsis1.5s[&<>\"\x80-\xff]+su"[&<>\"\u0080-\uffff]+"s&t&s<Rks>Rls"t"txmls$http://www.w3.org/XML/1998/namespacethtmlshttp://www.w3.org/1999/xhtmltrdfs+http://www.w3.org/1999/02/22-rdf-syntax-ns#twsdls http://schemas.xmlsoap.org/wsdl/cCs#td|t|ifdS(Nscannot serialize %r (type %s)(RottypeR!(R((s(/sys/lib/python/xml/etree/ElementTree.pyRpscCsMtd}yt|i||dSWntj ot|nXdS(NcSspg}|i}xN|iD]@}|i|}|djodt|}n||qWti|dS(Ns&#%d;R(RtgroupR?Rtordtstringtjoin(tmtmaptoutRtcharR((s(/sys/lib/python/xml/etree/ElementTree.pytescape_entitiess   tascii(t _escape_mapRqtsubRoRp(RtpatternR((s(/sys/lib/python/xml/etree/ElementTree.pyt_encode_entity s  c Csy||o7yt||}WqAtj ot|SqAXn||dd}||dd}||dd}|SWn#ttfj ot|nXdS(NRs&Rks<Rls>(Rqt UnicodeErrorRRoR}Rp(RRitreplace((s(/sys/lib/python/xml/etree/ElementTree.pyRm sc Csy|o7yt||}WqAtj ot|SqAXn||dd}||dd}||dd}||dd}||d d }|SWn#ttfj ot|nXdS( NRs&t's's"s"Rks<Rls>(RqRRRoR}Rp(RRiR((s(/sys/lib/python/xml/etree/ElementTree.pyRs/scCst|to |i}nti|ddd\}}|i|}|djoeti|}|djodt|}n|||<|djo d}qd||f}nd}d||f|fS(Nit}sns%dRsxmlns:%ss%s:%s( RSR RRtsplitR?Rt_namespace_mapR*(RRtt namespace_uritprefixRv((s(/sys/lib/python/xml/etree/ElementTree.pyRn@s      cCst}|i|||S(N(RR(RaRbttree((s(/sys/lib/python/xml/etree/ElementTree.pyR\s cBsMeZddZdZyedZWnej odZnXRS(cCst|dpt|d}n||_g|_d|_d|_|_t|_ |i i }|ii }|djo dg}nx|D] }|djory7d|_ d|_ |||i i d}||_Wqtj o(|||i id}||_qXq|djo%|||i id }||_q|d jo||d }||_q|d jo||d }||_qqWdS(NR[R\itendR1icSs|||||fdS(N((Rt attrib_inteventRR1((s(/sys/lib/python/xml/etree/ElementTree.pythandler~scSs|||||fdS(N((RRRRR1((s(/sys/lib/python/xml/etree/ElementTree.pyRscSs||||fdS(N((RRRR((s(/sys/lib/python/xml/etree/ElementTree.pyRssstart-nscSsJyt|d}Wntj onX|||pd|ffdS(NRR(RqR(RturiRR((s(/sys/lib/python/xml/etree/ElementTree.pyRs send-nscSs||dfdS(N(R(RRR((s(/sys/lib/python/xml/etree/ElementTree.pyRs(R]R^t_filet_eventst_indexRtrootRWRt_parserRtordered_attributestspecified_attributest _start_listtStartElementHandlerR}t_startt_endtEndElementHandlertStartNamespaceDeclHandlertEndNamespaceDeclHandler(RRateventsRbRRR((s(/sys/lib/python/xml/etree/ElementTree.pyR&lsD                 cCsxy|i|i}Wntj o|idjo6|i|_y tWqntj o tqnXn|i2d|_|i i d}|o|ii |q|ii |_d|_qX|id|_|SqdS(Nii@i( RRt IndexErrorRRRWRt StopIterationt NameErrorRR[R_R`(RtitemRc((s(/sys/lib/python/xml/etree/ElementTree.pytnexts&   cCs|S(N((R((s(/sys/lib/python/xml/etree/ElementTree.pyt__iter__scCs |iS(N(R(RR,((s(/sys/lib/python/xml/etree/ElementTree.pyR-sN( R!R"RR&RtiterRRR-(((s(/sys/lib/python/xml/etree/ElementTree.pyRjs -  cCs t}|i||iS(N(RR_R`(RRb((s(/sys/lib/python/xml/etree/ElementTree.pyRs  cCsmt}|i||i}h}x8|iD]*}|id}|o|||R.R(RR((s(/sys/lib/python/xml/etree/ElementTree.pyt_flushs  cCs|ii|dS(N(RR(RRc((s(/sys/lib/python/xml/etree/ElementTree.pyRc(scCsb|i|i|||_}|io|idi|n|ii|d|_|S(Nii(RRRRRR(RRtattrsR((s(/sys/lib/python/xml/etree/ElementTree.pyR13s   cCsY|i|ii|_|ii|jptd|ii|fd|_|iS(Ns&end tag mismatch (expected %s, got %s)i(RRtpopRRR.R(RR((s(/sys/lib/python/xml/etree/ElementTree.pyRCs  N( R!R"RR&R`RRcR1R(((s(/sys/lib/python/xml/etree/ElementTree.pyR s     cBsqeZdd dZdZdZdZdZdZdZ dZ d Z d Z d Z RS( ic Cs?yddkl}Wntj otdnX|idd|_}|djo t}n||_h|_|i |_ |i |_ |i |_|i|_yd|i_Wntj onXy(d|i_d|i_|i|_ Wntj onXd}|ip d}nd|_h|_dS(Ni(texpats7No module named expat; use SimpleXMLTreeBuilder insteadRisutf-8(t xml.parsersRt ImportErrort ParserCreateRRR t_targett_namest_defaulttDefaultHandlerExpandRRRRRtCharacterDataHandlert buffer_textR}RRRtreturns_unicodet_doctypetentity(RRRNRRbRi((s(/sys/lib/python/xml/etree/ElementTree.pyR&Ys:             cCs/yt|dSWntj o |SnXdS(NR(RqR(RR((s(/sys/lib/python/xml/etree/ElementTree.pyt_fixtext}scCsfy|i|}WnNtj oB|}d|jod|}n|i||i|<}nX|S(NRRj(RtKeyErrorR(RR@tname((s(/sys/lib/python/xml/etree/ElementTree.pyt_fixnames cCsd|i}||}h}x3|iD]%\}}|i||||Ksv $                   W  X