\STc@sdZddlZddlmZmZmZmZddlTddlm Z m Z e fZ ej jjej jjfZdej jefdYZeedd d eed d d eed d ddZdZdZdZdZdefdYZdefdYZeedd deed d deedd ddeefdYZeedd d eZd!efd"YZeeeZ d#efd$YZ!ee!d%d d&ee!d d d'd(Z"d)fd*YZ#d+e#efd,YZ$d-e#efd.YZ%ee%dd d/d0e%fd1YZ&ee&d2d d3ee&d4d d5d6Z'd7Z(d8e#e%fd9YZ)d:e&fd;YZ*d<eefd=YZ+ee+dd d>d?fd@YZ,dAe,e#efdBYZ-dCe,efdDYZ.dEe,e#efdFYZ/dGe fdHYZ0dIefdJYZ1dKZ2dLee fdMYZ3ee3dNd dOdPZ4dQZ5dRZ6dSZ7eedTZ8edUZ9edVZ:dS(Ws(minidom.py -- a lightweight DOM implementation. parse("foo.xml") parseString("") 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 iN(tEMPTY_NAMESPACEt EMPTY_PREFIXtXMLNS_NAMESPACEtdomreg(t*(tDOMImplementationLSt DocumentLStNodecBseZdZdZdZdZdZeZ dZ ddZ ddddZ dZ dZdZdZd Zd Zd Zd Zd ZdZdZdZdZdZdZdZdZdZdZRS(cCstS(N(tTrue(tself((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt __nonzero__+scCs|jdd|S(Nt(t toprettyxml(R tencoding((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyttoxml.ss s cCst}|dk r=ddl}|j|d|}n|jtjkrk|j|d|||n|j|d|||jS(NiiR ( t _get_StringIOtNonetcodecstlookuptnodeTypeRt DOCUMENT_NODEtwritexmltgetvalue(R tindenttnewlR twriterR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR 1s   cCstS(N(tFalse(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt hasAttributes@scCs|jr tStSdS(N(t childNodesRR(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt hasChildNodesCs cCs|jS(N(R(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_get_childNodesIscCs|jr|jdSdS(Ni(R(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_get_firstChildLs cCs|jr|jdSdS(Ni(R(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_get_lastChildPs cCsw|j|jkr@x't|jD]}|j||q"W|S|j|jkr}tjjdt |t |fn|j dk r|j j |n|dkr|j |ny|jj|}Wn tk rtjjnX|jtkrt|n|jj||||_||_|ra|j|d}||_||_n d|_||_ |S(Ns%s cannot be child of %si(RtDOCUMENT_FRAGMENT_NODEttupleRt insertBeforet_child_node_typestxmltdomtHierarchyRequestErrtreprt parentNodeRt removeChildt appendChildtindext ValueErrort NotFoundErrt_nodeTypes_with_childrent_clear_id_cachetinsertt nextSiblingtpreviousSibling(R tnewChildtrefChildtcR,tnode((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR#Ts6 "         cCs|j|jkr=x$t|jD]}|j|q"W|S|j|jkrztjjdt |t |fn|jt krt |n|j dk r|j j|nt||d|_|S(Ns%s cannot be child of %s(RR!R"RR+R$R%R&R'R(R/R0R)RR*t _append_childR2(R R7R6((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR+ts "   cCs|j|jkr8|j}|j||j||S|j|jkrutjjdt |t |fn|j dk r|j j|n||krdSy|j j |}Wn tk rtjjnX|jtks|jtkr t|n||j |<||_ d|_ |j|_|j|_d|_d|_|jrl||j_n|jr||j_n|S(Ns%s cannot be child of %s(RR!R2R*R#R$R%R&R'R(R)RRR,R-R.R/R0R3(R R4toldChildR5R,((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt replaceChilds<   "            cCsy|jj|Wn tk r6tjjnX|jdk rX|j|j_n|jdk ry|j|j_nd|_|_|j t krt |nd|_ |S(N( RtremoveR-R%R&R.R2RR3RR/R0R)(R R9((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR*s   cCsBg}x+|jD] }|jtjkr|j}|r|r|dj|jkr|d}|j|j|_|j|_|jq0|r|r||d_|d|_n d|_|j |q0|jq|r||d_|d|_n d|_|j ||jtj kr|j qqW||j(dS(Ni( RRRt TEXT_NODEtdataR2tunlinkR3Rtappendt ELEMENT_NODEt normalize(R tLtchildR=R7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRAs0 "         cCst|||jp|S(N(t _clone_nodet ownerDocument(R tdeep((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt cloneNodescCs|jjj||S(N(REtimplementationt hasFeature(R tfeaturetversion((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt isSupportedscCsdS(N(R(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_get_localNamescCs ||kS(N((R tother((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt isSameNodescCs|j|dr|SdSdS(N(RLR(R RJ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt getInterfacescCs2y|j|dSWnttfk r-dSXdS(Ni(t _user_datatAttributeErrortKeyErrorR(R tkey((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt getUserDatascCsd}y |j}Wn tk r5i}||_nX|j|rV||d}n|dkrd}|dk r||=qn||f||<|S(Ni(RRQRRthas_key(R RTR=thandlertoldtd((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt setUserDatas      cCsdt|dr`xN|jjD]:\}\}}|dk r|j|||||qqWndS(NRQ(thasattrRQtitemsRthandle(R t operationtsrctdstRTR=RW((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_call_user_data_handlers" cCs\d|_|_|jrFx|jD]}|jq#Wt|_nd|_d|_dS(N(RR)RERR>tNodeListR3R2(R RC((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR>s  N( t__name__t __module__Rt namespaceURIR)RER2R3RtprefixR RR RRRRR R#R+R:R*RARGRLRMRORPRURZRaR>(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR"s8                t firstChildtdocsFirst child node, or None.t lastChildsLast child node, or None.t localNames"Namespace-local name of this node.cCsT|j}|r6|d}||jd<||jds>N(treplacetwrite(RR=((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt _write_data.scCsex^|jD]S}|jtjkrM|dks=|j|krM|j|nt|||q W|S(NR(RRRR@ttagNameR?t_get_elements_by_tagName_helper(tparenttnametrcR7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRu4s c Csx|jD]t}|jtjkr |dks=|j|krh|dksX|j|krh|j|nt||||q q W|S(NR(RRRR@RjReR?t"_get_elements_by_tagName_ns_helper(RvtnsURIRjRxR7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRy<stDocumentFragmentcBsbeZejZdZdZdZdZ ej ej ej ej ejejejfZdZRS(s#document-fragmentcCst|_dS(N(RbR(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt__init__SsN(RcRdRR!RtnodeNameRt nodeValuet attributesR)R@R<tCDATA_SECTION_NODEtENTITY_REFERENCE_NODEtPROCESSING_INSTRUCTION_NODEt COMMENT_NODEt NOTATION_NODER$R|(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR{Es  tAttrcBseZejZd Zd ZeZ eZ ej ej fZ ed d dZdZdZdZdZdZdZdZdZd ZRS( cCsS|j}||d<|d<||d<||d(R telemRC((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR>s     cCs|jr tS|j}|j}|dks7|dkr;tS|j|}|dkrZtS|jry|j|j|j S|j |j SdS(N( RRRERRRt_get_elem_infoRetisIdNSRjtisIdR}(R RhRtinfo((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt _get_isIds     cCs|j}|j}|dks*|dkr.tS|j|}|dkrMtS|jrl|j|j|jS|j|j SdS(N( RERRt_no_typeRRetgetAttributeTypeNSRjtgetAttributeTypeR}(R RhRR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_get_schemaTypes    N(RcRdRtATTRIBUTE_NODERRRRRRRR<RR$RR|RMRRRRRR>RR(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRWs"         Rs True if this attribute is an ID.s'Namespace-local name of this attribute.t schemaTypesSchema type for this attribute.t NamedNodeMapcBseZdZdZdZdZdZdZdZd Z d Z d Z d Z dd 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(RRR(R tattrstattrsNSR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR|s  cCs t|jS(N(tlenR(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt _get_lengthscCs2y||jj|SWntk r-dSXdS(N(Rtkeyst IndexErrorR(R R,((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytitems cCs=g}x0|jjD]}|j|j|jfqW|S(N(RtvaluesR?R}R(R RBR7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR\scCsFg}x9|jjD](}|j|j|jf|jfqW|S(N(RRR?ReRjR(R RBR7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytitemsNSs&cCs3t|tr|jj|S|jj|SdS(N(t isinstancet StringTypesRRVR(R RT((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRVscCs |jjS(N(RR(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCs |jjS(N(RR(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytkeysNSscCs |jjS(N(RR(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCs|jj||S(N(Rtget(R RwR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCs<|jt|ddkrdStt|t|SdS(NRi(RtgetattrRtcmptid(R RN((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt__cmp__ scCs)t|tr|j|S|j|SdS(N(Rt _TupleTypeRR(R tattname_or_tuple((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt __getitem__s cCst|trhy|j|}Wn9tk r[t|}|jj|_|j|nX||_n.t|tst dn|}|j|dS(Ns%value must be a string or Attr object( RRRRSRRREt setNamedItemRt TypeError(R tattnameRR7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt __setitem__s    cCs(y|j|SWntk r#dSXdS(N(RRSR(R Rw((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt getNamedItem&s cCs.y|j||fSWntk r)dSXdS(N(RRSR(R ReRj((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytgetNamedItemNS,s cCs|j|}|dk rqt|j|j|j=|j|j|jf=|j j drmd|j ds   cCst|ts:tjjdt|t|fn|jj|j}|rq|j |j j |_ n||j|j<||j |j |jf<|j |_t|j|S(Ns%s cannot be child of %s(RRR%R&R'R(RRRwR>RRERReRjRR0(R R7RX((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRJs "   cCs |j|S(N(R(R R7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytsetNamedItemNSXscCs%||}t|j|jdS(N(R0RR>(R RR7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt __delitem__[s  cCs|j|j|jfS(N(RRR(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt __getstate__`scCs|\|_|_|_dS(N(RRR(R tstate((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt __setstate__cs(s_attrss_attrsNSs _ownerElementN(RcRdt__doc__t __slots__R|RRR\RRVRRRRRt__len__RRRRRRRRRRRR(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs2                   tlengths$Number of nodes in the NamedNodeMap.tTypeInfocBs2eZdZdZdZdZdZRS(t namespaceRwcCs||_||_dS(N(RRw(R RRw((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR|os cCs/|jrd|j |j fSd|j SdS(Nss (RRw(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt__repr__ss cCs|jS(N(Rw(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRyscCs|jS(N(R(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_get_namespace|s(s namespacesname(RcRdRR|RRR(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRls    tElementcBsLeZejZdZeZdZ ejej ej ej ej ejfZedddZdZdZdZdZdZdZdZd Zd Zd ZeZd Zd ZdZeZ dZ!dZ"dZ#dZ$dZ%ddddZ&dZ'dZ(dZ)dZ*dZ+RS(icCsD||_|_||_||_t|_i|_i|_dS(N(RtR}RfReRbRRR(R RtReRfRj((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR|s     cCs|jjdddS(NRii(RtR(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRMscCs|jS(N(Rt(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt _get_tagNamescCsGx!|jjD]}|jqWd|_d|_tj|dS(N(RRR>RRR(R tattr((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR>s   cCs+y|j|jSWntk r&dSXdS(NR (RRRS(R R((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt getAttributes cCs1y|j||fjSWntk r,dSXdS(NR (RRRS(R ReRj((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytgetAttributeNSs cCs|j|}|dkr_t|}|j}||d<|d<|j|d<|j|nC||jkr|j}||d<|d<|jrt|qndS(NRR~RE( tgetAttributeNodeRRRkREtsetAttributeNodeRRR0(R RRRRY((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt setAttributes      cCst|\}}|j||}|dkrt||||}|j}||d<||d<||d<|d<|j|d<|j|ni|j}||jkr||d<|d<|jrt |qn|j |kr||d<||dRE(R R7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs     cCs|jj|S(N(RRV(R Rw((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt hasAttributescCs|jj||fS(N(RRV(R ReRj((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pythasAttributeNSscCst||tS(N(RuRb(R Rw((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytgetElementsByTagNamescCst|||tS(N(RyRb(R ReRj((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytgetElementsByTagNameNSscCsd|jt|fS(Ns(RtR(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR!sR c Cs|j|d|j|j}|j}|jx@|D]8}|jd|t|||j|jdqAW|jr|jd|x+|jD] }|j|||||qW|jd||j|fn|jd|dS(NRos %s="s"s>%ss %s%ss/>%s( RrRtt_get_attributesRtsortRsRRR( R RRt addindentRRta_namesta_nameR7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR$s      cCst|j|j|S(N(RRR(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR:scCs|jr tStSdS(N(RRR(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR=s cCs |j|}|j|dS(N(RtsetIdAttributeNode(R RwtidAttr((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytsetIdAttributeEscCs#|j||}|j|dS(N(RR(R ReRjR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytsetIdAttributeNSIscCs|dks|j|j r1tjjnt|dk rUtjjn|jst |j d<|j d7_ |j j d7_ t|ndS(NRi(RRORR%R&R.t_get_containing_entreftNoModificationAllowedErrRRRkRRERR0(R R((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRMs  N(,RcRdRR@RRR~RRRRRR<RRR$RR|RMRR>RRRRRRRtsetAttributeNodeNSRRRtremoveAttributeNodeNSRRRRRRRRRRR(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRsL                         Rs*NamedNodeMap of attributes on the element.s%Namespace-local name of this element.cCsDt|||j|j<||j|j|jf<||jd%s(RrRR=(R RRRR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs( RcRdRRRR|RRRRRR(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs       t CharacterDatacBsteZdZeZdZdZeZeZdZdZ dZ dZ dZ dZ d ZRS( cCs t|jS(N(RR=(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCs |jdS(NR=(Rk(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCs|j}||d<|di(R=Rt __class__Rc(R R=t dotdotdot((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs   cCs~|dkr!tjjdn|t|jkrKtjjdn|dkrltjjdn|j|||!S(Nisoffset cannot be negatives#offset cannot be beyond end of datascount cannot be negative(R%R&t IndexSizeErrRR=(R toffsettcount((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt substringDatas  cCs|j||_dS(N(R=(R targ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt appendDatascCs||dkr!tjjdn|t|jkrKtjjdn|rxd|j| ||j|f|_ndS(Nisoffset cannot be negatives#offset cannot be beyond end of datas%s%s%s(R%R&RRR=(R RR ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt insertDatas cCs|dkr!tjjdn|t|jkrKtjjdn|dkrltjjdn|r|j| |j|||_ndS(Nisoffset cannot be negatives#offset cannot be beyond end of datascount cannot be negative(R%R&RRR=(R RR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt deleteDatas  cCs|dkr!tjjdn|t|jkrKtjjdn|dkrltjjdn|rd|j| ||j||f|_ndS(Nisoffset cannot be negatives#offset cannot be beyond end of datascount cannot be negatives%s%s%s(R%R&RRR=(R RRR ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt replaceDatas  (RcRdRRRRt_get_nodeValuet_set_nodeValueRRR R R R R(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs      sLength of the string data.RcBsSeZejZdZdZdZddddZ dZ dZ dZ RS(s#textcCs|dks!|t|jkr6tjjdn|j}|j||_|j|_|j}|jr||jj kr|dkr|jj |q|jj ||n|j| |_|S(Nisillegal offset value( RR=R%R&RRRER2R)RRR+R#(R RtnewTexttnext((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt splitTexts!    R cCs!t|d||j|fdS(Ns%s%s%s(RsR=(R RRRR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCs|jg}|j}xK|dk rb|jtjtjfkr^|jd|j|j}qPqW|j}xH|dk r|jtjtjfkr|j |j|j}qoPqoWdj |S(NiR ( R=R3RRRR<RR1R2R?tjoin(R RBR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_get_wholeTexts     cCs|j}|j}xK|dk r_|jtjtjfkr[|j}|j||}qPqW|j}|s|j|nxK|dk r|jtjtjfkr|j}|j||}qPqW|r|j }||d<||d<|SdSdS(NR=R~( R)R3RRRR<RR*R2Rk(R tcontentRvRRRY((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytreplaceWholeText(s.            cCs_|jjrtSt|}|dkr/tS|jj|}|dkrQtS|jSdS(N(R=tstripRt_get_containing_elementRRERtisElementContent(R RR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt!_get_isWhitespaceInElementContentFs   N( RcRdRR<RR}RRRRRRR(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs    tisWhitespaceInElementContentsKTrue iff this text node contains only whitespace and is in element content.t wholeTexts.The text of all logically-adjacent text nodes.cCs?|j}x/|dk r:|jtjkr.|S|j}q WdS(N(R)RRRR@(R7R6((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRYs   cCs?|j}x/|dk r:|jtjkr.|S|j}q WdS(N(R)RRRR(R7R6((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRas   tCommentcBs2eZejZdZdZddddZRS(s#commentcCs||_|_dS(N(R=R~(R R=((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR|nsR cCs!|jd||j|fdS(Ns %s%s(RrR=(R RRRR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRqs(RcRdRRRR}R|R(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRjs  t CDATASectioncBs)eZejZdZddddZRS(s#cdata-sectionR cCs?|jjddkr'tdn|jd|jdS(Ns]]>is$']]>' not allowed in a CDATA sections(R=tfindR-Rr(R RRRR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRys(RcRdRRRR}R(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRus tReadOnlySequentialNamedNodeMapcBseZdZddZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZRS(t_seqcCs ||_dS(N(R"(R tseq((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR|scCs t|jS(N(RR"(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCs t|jS(N(RR"(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCs+x$|jD]}|j|kr |Sq WdS(N(R"R}(R RwR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCs:x3|jD](}|j|kr |j|kr |Sq WdS(N(R"ReRj(R ReRjR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCsLt|tr!|j|}n|j|}|dkrHt|n|S(N(RRRRRRS(R t name_or_tupleR7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs   cCs8|dkrdSy|j|SWntk r3dSXdS(Ni(RR"R(R R,((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs   cCstjjddS(Ns"NamedNodeMap instance is read-only(R%R&R(R Rw((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs cCstjjddS(Ns"NamedNodeMap instance is read-only(R%R&R(R ReRj((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs cCstjjddS(Ns"NamedNodeMap instance is read-only(R%R&R(R R7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs cCstjjddS(Ns"NamedNodeMap instance is read-only(R%R&R(R R7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs cCs |jgS(N(R"(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCs)t|dkst|d|_dS(Nii(RtAssertionErrorR"(R R((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs(s_seq((RcRdRR|RRRRRRRRRRRR(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR!s           s&Number of entries in the NamedNodeMap.t IdentifiedcBs)eZdZdZdZdZRS(s@Mix-in class that supports the publicId and systemId attributes.cCs||_||_dS(N(tpublicIdtsystemId(R R'R(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_identified_mixin_inits cCs|jS(N(R'(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt _get_publicIdscCs|jS(N(R((R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt _get_systemIds(RcRdRR)R*R+(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR&s  t DocumentTypecBs\eZejZdZdZdZdZ dZ dZ dZ dZ ddddZRS(cCsLt|_t|_|r<t|\}}||_n|j|_dS(N(R!tentitiest notationsRRwR}(R RRfR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR|s    cCs|jS(N(tinternalSubset(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_get_internalSubsetscCs\|jdkrTtd}|j|_|j|_tjjj}|r=g|j _ g|j _ xU|j j D]G}t |j|j |j}|j j j||j|||qmWx|j j D]q}t|j|j |j|j}|j|_|j|_|j|_|j j j||j|||qWn|j||||SdSdS(N(RERR,RwR}R%R&tUserDataHandlert NODE_CLONEDR-R"R.tNotationR'R(R?RatEntityt notationNametactualEncodingR RK(R RFtcloneR^Rtnotationtetentity((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRGs.         R cCs|jd|j|j|jrF|jd|j|jfn |jrf|jd|jn|jdk r|jd|j|j|jdn|jddS(Ns (RrRwR'R(R/R(R RRRR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs     N(RcRdRtDOCUMENT_TYPE_NODERRR~RwR'R(R/R|R0RGR(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR,s    R4cBsweZdZejZdZdZdZ dZ dZ dZ dZ dZdZdZdZdZRS( cCs2||_||_t|_|j||dS(N(R}R5RbRR)(R RwR'R(R8((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR|s   cCs|jS(N(R6(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_get_actualEncodingscCs|jS(N(R (R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt _get_encodingscCs|jS(N(RK(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt _get_version scCstjjddS(Ns(cannot append children to an entity node(R%R&R'(R R4((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR+#s cCstjjddS(Ns+cannot insert children below an entity node(R%R&R'(R R4R5((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR#'s cCstjjddS(Ns*cannot remove children from an entity node(R%R&R'(R R9((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR*+s cCstjjddS(Ns)cannot replace children of an entity node(R%R&R'(R R4R9((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR:/s N(RcRdRRRt ENTITY_NODERR~R6R RKR|R=R>R?R+R#R*R:(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR4 s        R3cBs eZejZdZdZRS(cCs||_|j||dS(N(R}R)(R RwR'R(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR|7s N(RcRdRRRRR~R|(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR33s tDOMImplementationc BsYeZd d d dddddddg ZdZdZdZd Zd ZRS(tcores1.0s2.0s3.0R%sls-loadcCs.|dkrd}n|j|f|jkS(NR (Rtlowert _features(R RJRK((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRIIs  c CsK|r*|jdk r*tjjdn|j}|dkoW|dkoW|dk }| r}|r}tjjdn|rt|\}}|dkr|dkrtjjdn|r| rtjjdn|j ||}|r |j |n|j |n|r5||_|_ 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(R)RR%R&tWrongDocumentErrt_create_documenttInvalidCharacterErrRRtcreateElementNSR+REtdoctypeRH( R ReRRIRhtadd_root_elementRfRR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytcreateDocumentNs4              cCs"t|}||_||_|S(N(R,R'R((R RR'R(RI((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytcreateDocumentType{s   cCs|j|dr|SdSdS(N(RIR(R RJ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRPscCstS(N(tDocument(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRFs(scores1.0(scores2.0(scores3.0N(scoreN(sxmls1.0(sxmls2.0(sxmls3.0(sxmlN(sls-loads3.0(sls-loadN( RcRdRRDRIRKRLRPRF(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRA<s   -  t ElementInfocBseeZdZd ZdZdZdZdZdZdZ dZ d Z d 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. RtcCs ||_dS(N(Rt(R Rw((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR|scCstS(N(R(R taname((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCstS(N(R(R ReRj((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCstS(N(R(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCstS(sQReturns true iff this element is declared to have an EMPTY content model.(R(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytisEmptyscCstS(s6Returns true iff the named attribte is a DTD-style ID.(R(R RO((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCstS(s<Returns true iff the identified attribute is a DTD-style ID.(R(R ReRj((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCs|jS(N(Rt(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCs ||_dS(N(Rt(R R((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs(stagName( RcRdRRR|RRRRPRRRR(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRNs        cCsZ|jtjkr+|jjd|_n+t|rV|jjjd|j_ndS(N( RRRt _id_cachetclearRt_id_search_stackRmRE(R7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR0s    RMcBseZejejejejfZejZ dZ d$Z d$Z d$Zd$Zd$ZZeZd$Zd$Zd$Zd$ZeZd$Zd$ZdZdZdZdZdZ dZ!dZ"dZ#d Z$d Z%d Z&d Z'd Z(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2dZ3dZ4dZ5dZ6dZ7dZ8dZ9dZ:d Z;d!d!d!d$d"Z<d#Z=RS(%s #documenticCs+t|_i|_i|_d|_dS(N(RbRt _elem_infoRQRRS(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR|s   cCs7|jr|j|jf}n |j}|jj|S(N(ReRjRtRTR(R RRT((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs  cCs|jS(N(R6(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR=scCs|jS(N(RI(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt _get_doctypescCs|jS(N(t documentURI(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_get_documentURIscCs|jS(N(R (R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR>scCs|jS(N(t errorHandler(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_get_errorHandlerscCs|jS(N(t standalone(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_get_standalonescCs|jS(N(tstrictErrorChecking(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_get_strictErrorCheckingscCs|jS(N(RK(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR?scCs|j|jkr=tjjdt|t|fn|jdk r_|jj|n|jt j kr|j rtjjdnt j ||S(Ns%s cannot be child of %ss two document elements disallowed( RR$R%R&R'R(R)RR*RR@t_get_documentElementR+(R R7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR+s "   cCsoy|jj|Wn tk r6tjjnXd|_|_d|_ |j |krkd|_ n|S(N( RR;R-R%R&R.RR2R3R)tdocumentElement(R R9((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR*s   cCs.x'|jD]}|jtjkr |Sq WdS(N(RRRR@(R R7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR^scCs9|jdk r(|jjd|_ntj|dS(N(RIRR>R(R ((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyR>!s  cCs|s dS|jjddd}|j|_|j|_|j|_x|jD]}t|||}|jj |st |jj ||j t jkr|jdkst n3|j t jkr|jdkst ||_n||_qPW|jtjjj|||S(N(RRHRKR RZRKRRDREROR%R?RRRR_R<RIR)RaR%R&R1R2(R RFR7Rt childclone((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRG's&      cCst}||_|S(N(R{RE(R RY((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytcreateDocumentFragment<s  cCst|}||_|S(N(RRE(R RtR9((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt createElementAs  cCs:t|tstdnt}||_||_|S(Nsnode contents must be a string(RRRRR=RE(R R=tt((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytcreateTextNodeFs     cCs:t|tstdnt}||_||_|S(Nsnode contents must be a string(RRRRR=RE(R R=R6((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytcreateCDATASectionNs     cCst|}||_|S(N(RRE(R R=R6((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt createCommentVs  cCst||}||_|S(N(RRE(R RR=tp((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytcreateProcessingInstruction[s cCs"t|}||_d|_|S(NR (RRER(R Rta((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytcreateAttribute`s   cCs1t|\}}t|||}||_|S(N(RRRE(R ReRRfRjR9((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRHfs cCs=t|\}}t||||}||_d|_|S(NR (RRRER(R ReRRfRjRi((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytcreateAttributeNSls   cCs"t||||}||_|S(N(R4RE(R RwR'R(R5R9((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_create_entityvs cCst|||}||_|S(N(R3RE(R RwR'R(R((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_create_notation{s cCsH|jj|r|j|S|jp,|js3dS|j}|dkr`|jg}||_n |sjdSd}x|rC|j}|jg|j D]}|j t kr|^q|j |}|rxa|j jD]}|jr>|j|j|jr||j|j<|j|kr+|}q;|js;Pq;qq|j|jr||j|j<|j|krx|}q|jsPqq|jr||j|j<|j|kr|}q|jdkrPqqqWnZ|jr0xN|j jD]:}|jr||j|j<|j|kr)|}q)qqWn|dk rsPqsqsW|S(Ni(RQRVRTRRRSR_tpoptextendRRR/RRRReRRjRRRRwR(R RtstacktresultR7RCRR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytgetElementByIds\                  cCst||tS(N(RuRb(R Rw((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCst|||tS(N(RyRb(R ReRj((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRscCs|jj||S(N(RHRI(R RJRK((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRLscCs^|jtjkr'tjjdn'|jtjkrNtjjdnt|||S(Nscannot import document nodess!cannot import document type nodes(RRRR%R&tNotSupportedErrR<RD(R R7RF((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt importNodes R cCs[|dkr|jdn|jd|x'|jD]}|j||||q7WdS(Ns s$ (RRrRR(R RRRRR R7((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs  c Cs|j|k r1tjjd||jfn|jtjtjfkratjjdn|t krd|kr|j dd\}}|dkr|tjj krtjj dqq'|dkr |tjj kr |jtjkr tjj dnd}|}n d}d}|jtjkrj|j}|dk rp|j}|j|qpnd}|j}||d<||d <||d <||d <|jtjkr||d RcRdRR@RRR<R$RRR}RR~RRIR)R3R2RARHR6R RZRKRR\RXRVRR|RR=RURWR>RYR[R]R?R+R*R^R>RGRaRbRdReRfRhRjRHRkRlRmRrRRRLRtRRv(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRMsh                             :      R_s#Top-level element of this document.c Cs|jj|r$tjjj}ntjjj}|jtj kr|j |j |j }xW|j jD]F}|j|j |j |j|j|j |j}|j|_qmW|rx3|jD]%}t|||}|j|qWqn|jtjkrS|j}|rx3|jD]%}t|||}|j|q$Wqn|jtjkrz|j|j}nm|jtjkr|j|j}nF|jtjkr|j|j |j}n|jtj!kr|j"|j}n|jtj#kr7|j$|j |j }t%|_|j|_n|jtj&kr|j|k s^t'tjjj}|j(j)|j*|j+|j,}||_|rg|j-_.g|j/_.xp|j/j.D]b} t0| j | j+| j,} || _|j/j.j1| t2| dr| j3|| | qqWx|j-j.D]} t4| j | j+| j,| j5} | j6| _6| j7| _7| j8| _8|| _|j-j.j1| t2| dr5| j3|| | q5q5Wqntjj9dt:|t2|dr |j3|||n|S(so Clone a node and give it the new owner document. Called by Node.cloneNode and Document.importNode RasCannot clone node %s(;REROR%R&R1R2t NODE_IMPORTEDRRR@RHReR}RRRRRRjRRRDR+R!RaR<RdR=RReRRhRRRfRRkRR<R%RHRLRwR'R(R-R"R.R3R?R[RaR4R5R6R RKRsR(( R7RFtnewOwnerDocumentR^R7RRiRCR6RR8R9R:((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRDs~                  cCs:|jdd}t|dkr(|Sd|dfSdS(NRiii(RRR(Rtfields((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRcscCsddlm}|S(Ni(tStringIO(Rz(Rz((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRkscCs?t|||}|j\}}|j||j|S(N(tapplytgetEventt expandNodeRR(tfunctargstkwargsteventsttoktypetrootNode((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyt_do_pulldom_parseps   cCsh|dkr0| r0ddlm}|j|Sddlm}t|j|fi|d6|d6SdS(s3Parse a file into a DOM by filename or file object.i(t expatbuilder(tpulldomtparsertbufsizeN(Rtxml.domRtparseRR(tfileRRRR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRws  cCsZ|dkr)ddlm}|j|Sddlm}t|j|fi|d6SdS(s&Parse a file into a DOM from a string.i(R(RRN(RRRt parseStringRR(tstringRRR((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyRs   cCsa|rZt|tr'tj|}nx0|D]%\}}tjj||s.dSq.WntjS(N(RRRt_parse_feature_stringRMRHRIR(tfeaturestftv((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pytgetDOMImplementations (;RRR%RRRRtxml.dom.minicompattxml.dom.xmlbuilderRRttypeRR&RR@RR/t GetattrMagict defpropertyR8RmRsRuRyR{RtNewStyleRt AttributeListRRRRRRRRRRRRRR!R&R,R4R3RARNR0RMRDRRRRRR(((sC/opt/freeware/lib64/python2.7/site-packages/_xmlplus/dom/minidom.pyts "       u    $G\      ?  <( Q* O  R