+
    f4jh                    b   R t ^ RIt^ RIt^ RIHtHtHtHt ^ RI5 ^ RI	H
t
Ht ]P                  P                  P                  ]P                  P                  P                  3t ! R R]P                  P                  4      t]! ]RRR	7       ]! ]R
RR	7       ]! ]RRR	7       R tR tR tR t ! R R]4      t ! R R]4      t]! ]RRR	7       ]! ]RRR	7       ]! ]RRR	7        ! R R]4      t]! ]RRR	7       ]t ! R R ]4      t]! RR4      t ! R! R"]4      t]! ]R#R$R	7       ]! ]RR%R	7       R& t ! R' R(4      t ! R) R*]]4      t  ! R+ R,]]4      t!]! ]!RR-R	7        ! R. R/]!4      t"]! ]"R0R1R	7       ]! ]"R2R3R	7       R4 t#R5 t$ ! R6 R7]!4      t% ! R8 R9]"4      t& ! R: R;]4      t']! ]'RR<R	7        ! R= R>4      t( ! R? R@](]]4      t) ! RA RB](]4      t* ! RC RD](]]4      t+ ! RE RF]
4      t, ! RG RH]4      t-RI t. ! RJ RK]]4      t/]! ]/RLRMR	7       RN t0RO t1RP t2RTRQ lt3RURR lt4RURS lt5R# )Vac  Simple implementation of the Level 1 DOM.

Namespaces and other minor Level 2 features are also supported.

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)EMPTY_NAMESPACEEMPTY_PREFIXXMLNS_NAMESPACEdomreg*)DOMImplementationLS
DocumentLSc                      a  ] tR t^"t o RtRtRtRtRt]	t
R tRR ltRR ltR tR tR tR tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!Rt"V t#R# )NodeNc                    R # )T selfs   &!lib/python3.14/xml/dom/minidom.py__bool__Node.__bool__+           c                (    V P                  R R W4      #  )toprettyxml)r   encoding
standalones   &&&r   toxml
Node.toxml.   s    B==r   c                   Vf   \         P                  ! 4       pM-\         P                  ! \         P                  ! 4       VRRR7      pV P                  \
        P                  8X  d   V P                  VRWW44       MV P                  VRW4       Vf   VP                  4       # VP                  4       P                  4       # )Nxmlcharrefreplace
)r   errorsnewliner   )
ioStringIOTextIOWrapperBytesIOnodeTyper   DOCUMENT_NODEwritexmlgetvaluedetach)r   indentnewlr   r   writers   &&&&& r   r   Node.toprettyxml1   s    [[]F%%bjjl/7-@.24F ==D...MM&"fHIMM&"f3??$$==?++--r   c                ,    \        V P                  4      # N)bool
childNodesr   s   &r   hasChildNodesNode.hasChildNodesD   s    DOO$$r   c                    V P                   # r0   r2   r   s   &r   _get_childNodesNode._get_childNodesG       r   c                P    V P                   '       d   V P                   ^ ,          # R#     Nr6   r   s   &r   _get_firstChildNode._get_firstChildJ   s    ?????1%% r   c                P    V P                   '       d   V P                   R,          # R#    Nr6   r   s   &r   _get_lastChildNode._get_lastChildN   s    ?????2&& r   c                X   VP                   V P                  8X  d0   \        VP                  4       F  pV P	                  W24       K  	  V# VP                   V P
                  9  d9   \        P                  P                  \        V4      : R \        V 4      : 24      hVP                  e   VP                  P                  V4       Vf   V P                  V4       V#  V P                  P                  V4      pTP                   \         9   d   \#        T 4       T P                  P%                  YA4       Y!n        Yn        T'       d(   T P                  T^,
          ,          pYn        YQn        MRTn        Yn
        T#   \         d     \        P                  P                  4       hi ; i cannot be child of N)r&   DOCUMENT_FRAGMENT_NODEtupler2   insertBefore_child_node_typesxmldomHierarchyRequestErrrepr
parentNoderemoveChildappendChildindex
ValueErrorNotFoundErr_nodeTypes_with_children_clear_id_cacheinsertnextSiblingpreviousSibling)r   newChildrefChildcrS   nodes   &&&   r   rJ   Node.insertBeforeR   s`    ; ;;8../!!!. 0 OD$:$::''--.28nd4jIK K*++H5X&$ !,--h7   $<<%OO""53#+ '/$uQw/#+ +/(+/("&  ,gg))++,s   E? ?*F)c                   VP                   V P                  8X  d0   \        VP                  4       F  pV P	                  V4       K  	  V# VP                   V P
                  9  d9   \        P                  P                  \        V4      : R \        V 4      : 24      hVP                   \        9   d   \        V 4       VP                  e   VP                  P                  V4       \        W4       RVn        V# rF   )r&   rH   rI   r2   rR   rK   rL   rM   rN   rO   rV   rW   rP   rQ   _append_childrY   )r   r^   r]   s   && r   rR   Node.appendChildr   s    ==D7774??+  # , K== 6 66''--.24j$t*EG G]]66D!??&OO''-d!r   c                   VP                   V P                  8X  d/   VP                  pV P                  V4       V P	                  W4      # VP                   V P
                  9  d9   \        P                  P                  \        V4      : R \        V 4      : 24      hWJ d   R# VP                  e   VP                  P                  V4        V P                  P                  V4      pYP                  T&   Yn
        RTn
        TP                   \        9   g   TP                   \        9   d   \!        T 4       TP                  Tn        TP"                  Tn        RTn        RTn        TP"                  '       d   YP"                  n        TP                  '       d   YP                  n        T#   \         d     \        P                  P                  4       hi ; irF   )r&   rH   rY   rQ   rJ   rK   rL   rM   rN   rO   rP   r2   rS   rT   rU   rV   rW   rZ   )r   r[   oldChildr\   rS   s   &&&  r   replaceChildNode.replaceChild   s    ; ;;++HX&$$X88D$:$::''--.28nd4jIK K*++H5	(OO))(3E "*""!99  $<<D!'33#+#;#; ##' ###3;$$03;  0!  	(''%%''	(s   F/ /*Gc                    V P                   P                  V4       TP                  e   TP                  TP                  n        TP                  e   TP                  TP                  n        R ;Tn        Tn        TP                  \        9   d   \        T 4       R Tn        T#   \         d     \        P                  P                  4       hi ; ir0   )r2   removerT   rL   rM   rU   rY   rZ   r&   rV   rW   rP   r   rd   s   &&r   rQ   Node.removeChild   s    	(OO""8, +3;3K3KH  0##/3;3G3GH$$0:>>x7 88D!"  	(''%%''	(s   B& &*Cc                V   . pV P                    EF  pVP                  \        P                  8X  Ed!   VP                  '       g`   V'       d   VP
                  VR,          n        VP
                  '       d   VP                  VP
                  n        VP                  4        K  V'       d   VR,          P                  VP                  8X  dr   VR,          pVP                  VP                  ,           Vn        VP
                  Vn        VP
                  '       d   W2P
                  n        VP                  4        EK0  VP                  V4       EKD  VP                  V4       VP                  \        P                  8X  g   EKw  VP                  4        EK  	  WP                   R&   R# )rA   NNNNrB   )r2   r&   r   	TEXT_NODEdatarY   rZ   unlinkappendELEMENT_NODE	normalize)r   Lchildr^   s   &   r   rr   Node.normalize   s   __E~~/zzz,1,=,=")(((<A<Q<Q))9LLN1R5>>U^^;R5D $		EJJ 6DI','8'8D$(((<@))9LLNHHUO>>T%6%66OO%- %. r   c                B    \        YV P                  ;'       g    T 4      # r0   )_clone_nodeownerDocument)r   deeps   &&r   	cloneNodeNode.cloneNode   s    4t'9'9'A'ATBBr   c                L    V P                   P                  P                  W4      # r0   )rx   implementation
hasFeaturer   featureversions   &&&r   isSupportedNode.isSupported   s    !!00;;GMMr   c                    R # r0   r   r   s   &r   _get_localNameNode._get_localName   s    r   c                    WJ # r0   r   r   others   &&r   
isSameNodeNode.isSameNode   s
    }r   c                :    V P                  VR 4      '       d   V # R # r0   )r   r   r   s   &&r   getInterfaceNode.getInterface   s    GT**Kr   c                h     V P                   V,          ^ ,          #   \        \        3 d     R# i ; ir;   )
_user_dataAttributeErrorKeyErrorr   keys   &&r   getUserDataNode.getUserData   s2    	??3'**) 		s    11c                    R p V P                   pW9   d   WQ,          ^ ,          pVf   R pVe   WQ V# W#3WQ&   V#   \         d    / pYPn          L?i ; ir0   )r   r   )r   r   rn   handleroldds   &&&&  r   setUserDataNode.setUserData   sm    	 A 8&)C<GF 
 _AF
  	 AO	 s   : AAc                    \        V R 4      '       dK   \        V P                  P                  4       4       F!  w  pw  rVVf   K  VP	                  WWRV4       K#  	  R# R# )r   N)hasattrlistr   itemshandle)r   	operationsrcdstr   rn   r   s   &&&&   r   _call_user_data_handlerNode._call_user_data_handler   sN    4&&(,T__-B-B-D(E$_d&NN94cB )F 'r   c                    R ;V n         V n        V P                  '       d3   V P                   F  pVP                  4        K  	  \	        4       V n        R V n        R V n        R # r0   )rP   rx   r2   ro   NodeListrZ   rY   )r   rt   s   & r   ro   Node.unlink  sJ    /33$,??? )&jDO#r   c                    V # r0   r   r   s   &r   	__enter__Node.__enter__  s    r   c                &    V P                  4        R # r0   )ro   )r   etevtbs   &&&&r   __exit__Node.__exit__  s    r   )r   r2   rY   rx   rP   rZ   NN)	r   NN)$__name__
__module____qualname____firstlineno__namespaceURIrP   rx   rY   rZ   r   prefixr   r   r   r3   r7   r=   rC   rJ   rR   re   rQ   rr   rz   r   r   r   r   r   r   r   ro   r   r   __static_attributes____classdictcell____classdict__s   @r   r   r   "   s     LJMKOF>.&%&'@"@ 6CN$C  r   r   
firstChildzFirst child node, or None.)doc	lastChildzLast child node, or None.	localNamez"Namespace-local name of this node.c                     V P                   pV'       d   VR,          pW1n        Wn        VP                  V4       Wn        R# r@   )r2   rZ   rY   rp   rP   )r   r^   r2   lasts   &&  r   ra   ra     s6    J"~#dOr   c                   V'       g   R# RV9   d   VP                  RR4      pRV9   d   VP                  RR4      pRV9   d   VP                  RR4      pV'       de   RV9   d   VP                  RR	4      pR
V9   d   VP                  R
R4      pRV9   d   VP                  RR4      pRV9   d   VP                  RR4      pV P                  V4       R# )zWrites datachars to writer.N&z&amp;<z&lt;>z&gt;"z&quot;z&#13;r   z&#10;r   z&#9;)replacewrite)r-   textattrs   &&&r   _write_datar   (  s     d{||C)
d{||C(
d{||C($;<<X.D4<<<g.D4<<<g.D4<<<f-D
LLr   c                     V P                    FW  pVP                  \        P                  8X  d*   VR 8X  g   VP                  V8X  d   VP                  V4       \        W1V4       KY  	  V# r   )r2   r&   r   rq   tagNamerp   _get_elements_by_tagName_helper)parentnamercr^   s   &&& r   r   r   ?  sR    !!==D---S[DLLD0IIdO'B7	 "
 Ir   c                    V P                    Fq  pVP                  \        P                  8X  g   K$  VR 8X  g   VP                  V8X  d*   VR 8X  g   VP
                  V8X  d   VP                  V4       \        WAW#4       Ks  	  V# r   )r2   r&   r   rq   r   r   rp   "_get_elements_by_tagName_ns_helper)r   nsURIr   r   r^   s   &&&& r   r   r   G  sg    !!==D---c!T^^y%@#!2!2e!;		$.tIJ " Ir   c                      a  ] tR tRt o ]P
                  tRtRtRt	Rt
]P                  ]P                  ]P                  ]P                  ]P                  ]P                   ]P"                  3tR tRtV tR# )DocumentFragmentiP  z#document-fragmentNc                $    \        4       V n        R # r0   )r   r2   r   s   &r   __init__DocumentFragment.__init__^  s    "*r   r6   )r   r   r   r   r   rH   r&   nodeName	nodeValue
attributesrP   rq   rm   CDATA_SECTION_NODEENTITY_REFERENCE_NODEPROCESSING_INSTRUCTION_NODECOMMENT_NODENOTATION_NODErK   r   r   r   r   s   @r   r   r   P  ss     **H#HIJJ**003399**++-% %r   r   c                     a  ] tR tRt o Rt]P                  tRtRt	Rt
]P                  ]P                  3t]RR3R ltR tR tR tR t]! ]]4      ;ttR	 tR
 t]! ]]4      ;ttR tR t]! ]]4      tR tR tR t Rt!V t"R# )Attrib  NFc                    R V n         R V n        Wn        W n        W@n        Ve   W0n        \        4       V n        V P                  P                  \        4       4       R # r0   )
ownerElementrx   _namer   _prefix
_localNamer   r2   rp   Text)r   qNamer   r   r   s   &&&&&r   r   Attr.__init__l  sL     !
( 'O"* 	tv&r   c                     V P                   #   \         d'    T P                  P                  R ^4      R,          u # i ; i:rB   )r   r   r   splitr   s   &r   r   Attr._get_localName|  s<    	3??" 	3==&&sA.r22	3    .??c                    V P                   # r0   )	specifiedr   s   &r   _get_specifiedAttr._get_specified      ~~r   c                    V P                   # r0   )r   r   s   &r   	_get_nameAttr._get_name      zzr   c                \    Wn         V P                  e   \        V P                  4       R # R # r0   )r   r   rW   r   values   &&r   	_set_nameAttr._set_name  s&    
(D--. )r   c                    V P                   # r0   )_valuer   s   &r   
_get_valueAttr._get_value      {{r   c                    Wn         WP                  ^ ,          n        V P                  e   \	        V P                  4       WP                  ^ ,          n        R# r;   )r  r2   rn   r   rW   r  s   &&r   
_set_valueAttr._set_value  s?    "'(D--."'r   c                    V P                   # r0   )r   r   s   &r   _get_prefixAttr._get_prefix      ||r   c                >   V P                   pVR 8X  d3   V'       d+   V\        8w  d    \        P                  P	                  R4      hWn        Vf   V P                  pMV: RV P                  : 2pV P                  '       d   \        V P                  4       W0n	        R# )xmlnsz5illegal use of 'xmlns' prefix for the wrong namespaceNr   )
r   r   rL   rM   NamespaceErrr   r   r   rW   r   )r   r   nsurinewNames   &&  r   _set_prefixAttr._set_prefix  s{    !!W/1gg**KM M>nnG!'8GD--.	r   c                   V P                   pVe   VP                  V P                   VP                  V P                  V P
                  3 V P                  '       dD   RV n        V;P                  ^,          un        V P                  ;P                  ^,          un	        V P                   F  pVP                  4        K  	  V P                  R R # )NFrl   )r   _attrsr   _attrsNSr   r   _is_id_magic_id_nodesrx   _magic_id_countr2   ro   )r   elemrt   s   &  r   ro   Attr.unlink  s    
   DMM*t00$..AB{{{#$$)$""22a72__ELLN %OOAr   c                B   V P                   '       d   R # V P                  pV P                  pVe   Vf   R# VP                  V4      pVf   R# V P                  '       d'   VP                  V P                  V P                  4      # VP                  V P                  4      # TF)	r  rx   r   _get_elem_infor   isIdNSr   isIdr   r   r   r  infos   &   r   	_get_isIdAttr._get_isId  s    ;;;    ;$,!!$'<;;t00$..AA99T]]++r   c                *   V P                   pV P                  pVe   Vf   \        # VP                  V4      pVf   \        # V P                  '       d'   VP                  V P                  V P                  4      # VP                  V P                  4      # r0   )	rx   r   _no_typer"  r   getAttributeTypeNSr   getAttributeTyper   r%  s   &   r   _get_schemaTypeAttr._get_schemaType  s~        ;$,O!!$'<O**4+<+<dnnMM((77r   )
r  r   r   r   r  r2   r   r   rx   r   )r   r  r   r   r2   r   rx   r   )#r   r   r   r   	__slots__r   ATTRIBUTE_NODEr&   r   r   r  rm   r   rK   r   r   r   r   r   r  propertyr   r   r  r  r   r  r  r  r   ro   r'  r-  r   r   r   s   @r   r   r   b  s     WI""HJIF)C)CD+:d' 3/
 y)44Ht( !Z88I k;/F", 8 8r   r   r$  z True if this attribute is an ID.z'Namespace-local name of this attribute.
schemaTypezSchema type for this attribute.c                      a  ] tR tRt o RtRtR tR tR tR t	R t
R tR	 tR
 tR tR R lt]tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!Rt"V t#R# )!NamedNodeMapi  zThe 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.
c                *    Wn         W n        W0n        R # r0   r  r  _ownerElement)r   attrsattrsNSr   s   &&&&r   r   NamedNodeMap.__init__  s    )r   c                ,    \        V P                  4      # r0   )lenr  r   s   &r   _get_lengthNamedNodeMap._get_length  s    4;;r   c                     V \        V P                  P                  4       4      V,          ,          #   \         d     R # i ; ir0   )r   r  keys
IndexErrorr   rS   s   &&r   itemNamedNodeMap.item  s;    	T[[--/0788 		s   03 AAc                    . pV P                   P                  4        F*  pVP                  VP                  VP                  34       K,  	  V# r0   )r  valuesrp   r   r  r   rs   r^   s   &  r   r   NamedNodeMap.items  s<    KK&&(DHHdmmTZZ01 )r   c                    . pV P                   P                  4        F6  pVP                  VP                  VP                  3VP
                  34       K8  	  V# r0   )r  rF  rp   r   r   r  rG  s   &  r   itemsNSNamedNodeMap.itemsNS  sG    KK&&(DHHt(($..94::FG )r   c                f    \        V\        4      '       d   WP                  9   # WP                  9   # r0   )
isinstancestrr  r  r   s   &&r   __contains__NamedNodeMap.__contains__  s)    c3++%%--''r   c                6    V P                   P                  4       # r0   )r  r@  r   s   &r   r@  NamedNodeMap.keys  s    {{!!r   c                6    V P                   P                  4       # r0   )r  r@  r   s   &r   keysNSNamedNodeMap.keysNS  s    }}!!##r   c                6    V P                   P                  4       # r0   )r  rF  r   s   &r   rF  NamedNodeMap.values  s    {{!!##r   Nc                8    V P                   P                  W4      # r0   r  get)r   r   r  s   &&&r   rZ  NamedNodeMap.get  s    {{t++r   c                    V P                   \        VR R4      J d   ^ # \        V 4      \        V4      8  \        V 4      \        V4      8  ,
          # )r  N)r  getattridr   s   &&r   _cmpNamedNodeMap._cmp  s?    ;;'%488tHr%y(RX5	-ABBr   c                *    V P                  V4      ^ 8H  # r<   r_  r   s   &&r   __eq__NamedNodeMap.__eq__"      yy1$$r   c                *    V P                  V4      ^ 8  # rb  rc  r   s   &&r   __ge__NamedNodeMap.__ge__%  rf  r   c                *    V P                  V4      ^ 8  # rb  rc  r   s   &&r   __gt__NamedNodeMap.__gt__(      yy!##r   c                *    V P                  V4      ^ 8*  # rb  rc  r   s   &&r   __le__NamedNodeMap.__le__+  rf  r   c                *    V P                  V4      ^ 8  # rb  rc  r   s   &&r   __lt__NamedNodeMap.__lt__.  rm  r   c                z    \        V\        4      '       d   V P                  V,          # V P                  V,          # r0   )rM  rI   r  r  )r   attname_or_tuples   &&r   __getitem__NamedNodeMap.__getitem__1  s0    &..==!122;;/00r   c                b   \        V\        4      '       d    V P                  V,          pW#n        R# \        V\        4      '       g   \        R 4      hTpV P                  V4       R#   \         d;    \	        T4      pT P
                  P                  Tn        T P                  T4        Li ; i)z%value must be a string or Attr objectN)
rM  rN  r  r   r   r7  rx   setNamedItemr  	TypeError)r   attnamer  r^   s   &&& r   __setitem__NamedNodeMap.__setitem__8  s    eS!!({{7+
 JeT** GHHDd#  (G}%)%7%7%E%E"!!$'(s   A) )AB.-B.c                N     V P                   V,          #   \         d     R # i ; ir0   )r  r   r   r   s   &&r   getNamedItemNamedNodeMap.getNamedItemG  s(    	;;t$$ 		s    $$c                P     V P                   W3,          #   \         d     R # i ; ir0   )r  r   r   r   r   s   &&&r   getNamedItemNSNamedNodeMap.getNamedItemNSM  s+    	==,!:;; 		s    %%c                <   V P                  V4      pVek   \        V P                  4       V P                  VP                   V P
                  VP                  VP                  3 \        VR4      '       d   R Vn	        V# \        P                  P                  4       hNr   )r  rW   r7  r  r   r  r   r   r   r   rL   rM   rU   r   r   ns   && r   removeNamedItemNamedNodeMap.removeNamedItemS  sz    d#=D../AJJ'q~~q{{;<q.))!%H''%%''r   c                <   V P                  W4      pVek   \        V P                  4       V P                  VP                  VP
                  3 V P                  VP                   \        VR4      '       d   R Vn	        V# \        P                  P                  4       hr  )r  rW   r7  r  r   r   r  r   r   r   rL   rM   rU   r   r   r   r  s   &&& r   removeNamedItemNSNamedNodeMap.removeNamedItemNS_  sz    8=D../q~~q{{;<AJJ'q.))!%H''%%''r   c                   \        V\        4      '       g9   \        P                  P	                  \        V4      : R \        V 4      : 24      hV P                  P                  VP                  4      pV'       d   VP                  4        WP                  VP                  &   WP                  VP                  VP                  3&   V P                  Vn        \        VP                  4       V# )rG   )rM  r   rL   rM   rN   rO   r  rZ  r   ro   r  r   r   r7  r   rW   )r   r^   r   s   && r   ry  NamedNodeMap.setNamedItemk  s    $%%''--.24j$t*EG Gkkoodii(JJL!%DII=At(($..9: ..))*
r   c                $    V P                  V4      # r0   )ry  r   r^   s   &&r   setNamedItemNSNamedNodeMap.setNamedItemNSx  s      &&r   c                `    W,          p\        VP                  4       VP                  4        R # r0   )rW   r   ro   )r   ru  r^   s   && r   __delitem__NamedNodeMap.__delitem__{  s!    %))*r   c                H    V P                   V P                  V P                  3# r0   r6  r   s   &r   __getstate__NamedNodeMap.__getstate__  s    {{DMM4+=+===r   c                0    Vw  V n         V n        V n        R # r0   r6  r   states   &&r   __setstate__NamedNodeMap.__setstate__  s    9>6T]D$6r   r6  r0   )$r   r   r   r   __doc__r/  r   r=  rC  r   rJ  rO  r@  rT  rF  rZ  __len__r_  rd  rh  rk  ro  rr  rv  r|  r  r  r  r  ry  r  r  r  r  r   r   r   s   @r   r4  r4    s      8I*
 ("$$, GC%%$%$1$
(
('
>? ?r   r4  lengthz$Number of nodes in the NamedNodeMap.c                   <   a  ] tR tRt o RtR tR tR tR tRt	V t
R# )	TypeInfoi  c                    Wn         W n        R # r0   	namespacer   )r   r  r   s   &&&r   r   TypeInfo.__init__  s    "	r   c                    V P                   '       d8   R V P                  P                  : RV P                  : RV P                   : R2# R V P                  P                  : RV P                  : R2# )r    z (from z)>r   )r  	__class__r   r   r   s   &r   __repr__TypeInfo.__repr__  sO    >>>*...*A*A499*...: :  !% 7 7CCr   c                    V P                   # r0   )r   r   s   &r   r   TypeInfo._get_name      yyr   c                    V P                   # r0   )r  r   s   &r   _get_namespaceTypeInfo._get_namespace  r   r   )r   r  Nr  )r   r   r   r   r/  r   r  r   r  r   r   r   s   @r   r  r    s$     #ID r   r  c                     a  ] tR tRt o Rt]P                  tRt]	t
^ t]P                  ]P                  ]P                  ]P                  ]P                  ]P                   3t]RR3R ltR tR tR tR tR tR	 tR
 tR tR tR tR t]tR t R t!R t"]"t#R t$R t%R t&R t'R t(RR lt)R t*R t+R t,R t-R t.Rt/V t0R# ) Elementi  Nc                    R V n         R V n        V;V n        V n        W0n        W n        \        4       V n        R ;V n        V n	        R V n
        R V n        R # r0   )rx   rP   r   r   r   r   r   r2   rY   rZ   r  r  )r   r   r   r   r   s   &&&&&r   r   Element.__init__  sS    !'..t}("*2664/ r   c                B    V P                   f   / V n         / V n        R # R # r0   )r  r  r   s   &r   _ensure_attributesElement._ensure_attributes  s    ;;DKDM r   c                     V P                   #   \         d'    T P                  P                  R ^4      R,          u # i ; ir   )r   r   r   r   r   s   &r   r   Element._get_localName  s<    	2??" 	2<<%%c1-b11	2r   c                    V P                   # r0   r   r   s   &r   _get_tagNameElement._get_tagName  r  r   c                    V P                   e;   \        V P                   P                  4       4       F  pVP                  4        K  	  R V n         R V n        \
        P                  V 4       R # r0   )r  r   rF  ro   r  r   )r   r   s   & r   ro   Element.unlink  sK    ;;"T[[//12 3Dr   c                    V P                   f   R#  V P                   V,          P                  #   \         d     R# i ; i)aV  Returns the value of the specified attribute.

Returns the value of the element's attribute named attname as
a string. An empty string is returned if the element does not
have such an attribute. Note that an empty string may also be
returned as an explicitly given attribute value, use the
hasAttribute method to distinguish these two cases.
r   )r  r  r   )r   r{  s   &&r   getAttributeElement.getAttribute  s=     ;;	;;w'--- 		s   / >>c                    V P                   f   R#  V P                   W3,          P                  #   \         d     R# i ; iNr   )r  r  r   r  s   &&&r   getAttributeNSElement.getAttributeNS  s>    == 	==,!:;AAA 		s   0 ??c                   V P                  V4      pVf6   \        V4      pW#n        V P                  Vn        V P	                  V4       R # W#P                  8w  d(   W#n        VP
                  '       d   \        V 4       R # R # R # r0   )getAttributeNoder   r  rx   setAttributeNoder$  rW   )r   r{  r  r   s   &&& r   setAttributeElement.setAttribute  sk    $$W-<=DJ!%!3!3D!!$'jj Jyyy%  !r   c                Z   \        V4      w  rEV P                  W4      pVf7   \        W!WT4      pW6n        V P                  Vn        V P                  V4       R # W6P                  8w  d$   W6n        VP                  '       d   \        V 4       VP                  V8w  d   WFn        W&n	        R # R # r0   )
_nssplitgetAttributeNodeNSr   r  rx   r  r$  rW   r   r   )r   r   qualifiedNamer  r   	localnamer   s   &&&&   r   setAttributeNSElement.setAttributeNS  s    $]3&&|?<YGDJ!%!3!3D!!$'

""
999#D){{f$$ - %r   c                X    V P                   f   R # V P                   P                  V4      # r0   rY  )r   attrnames   &&r   r  Element.getAttributeNode  s"    ;;{{x((r   c                Z    V P                   f   R # V P                   P                  W34      # r0   )r  rZ  r  s   &&&r   r  Element.getAttributeNodeNS  s'    == }}  ,!:;;r   c                   VP                   R V 39  d    \        P                  P                  R4      hV P	                  4        V P
                  P                  VP                  R 4      pVe   V P                  V4       V P                  P                  VP                  VP                  3R 4      pVe   W2Jd   V P                  V4       \        W4       W!Jd   V# W1Jd   V# R # )Nzattribute node already owned)r   rL   rM   InuseAttributeErrr  r  rZ  r   removeAttributeNoder  r   r   _set_attribute_node)r   r   old1old2s   &&  r   r  Element.setAttributeNode  s    T4L0''++,JKK!{{tyy$/$$T*}}  $"3"3T^^!DdK 0$$T*D' KK r   c                   V P                   f   \        P                  P                  4       h V P                  V,          pT P                  T4       R #   \
         d     \        P                  P                  4       hi ; ir0   )r  rL   rM   rU   r  r   r  )r   r   r   s   && r   removeAttributeElement.removeAttribute2  sf    == ''%%''	(;;t$D 	  &  	(''%%''	(s   A *A>c                   V P                   f   \        P                  P                  4       h V P                   W3,          pT P                  T4       R #   \         d     \        P                  P                  4       hi ; ir0   )r  rL   rM   rU   r   r  )r   r   r   r   s   &&& r   removeAttributeNSElement.removeAttributeNS;  si    == ''%%''	(==,!:;D 	  &  	(''%%''	(s   A *A?c                8   Vf   \         P                  P                  4       h V P                  VP                  ,           \        T 4       TP                  4        T P                  Tn        T#   \
         d     \         P                  P                  4       hi ; ir0   )	rL   rM   rU   r  r   r   rW   ro   rx   r  s   &&r   r  Element.removeAttributeNodeD  s{    <''%%''	(KK		" 	 "//  	(''%%''	(s   A/ /*Bc                >    V P                   f   R# WP                   9   # )zChecks whether the element has an attribute with the specified name.

Returns True if the element has an attribute with the specified name.
Otherwise, returns False.
Fr  r  s   &&r   hasAttributeElement.hasAttributeT  s     ;;{{""r   c                B    V P                   f   R# W3V P                   9   # )NF)r  r  s   &&&r   hasAttributeNSElement.hasAttributeNS^  s!    == (DMM99r   c                *    \        W\        4       4      # )zReturns all descendant elements with the given tag name.

Returns the list of all descendant elements (not direct children
only) with the specified tag name.
r   r   r  s   &&r   getElementsByTagNameElement.getElementsByTagNamec  s     /t8:FFr   c                ,    \        WV\        4       4      # r0   r   r   r  s   &&&r   getElementsByTagNameNSElement.getElementsByTagNameNSk      1	8:7 	7r   c                >    R V P                   \        V 4      3,          # )z<DOM Element: %s at %#x>)r   r^  r   s   &r   r  Element.__repr__o  s    )T\\2d8,DDDr   c                   VP                  VR,           V P                  ,           4       V P                  4       pVP                  4        FI  pVP                  RV,          4       \	        WV,          P
                  R4       VP                  R4       KK  	  V P                  '       Ed   VP                  R4       \        V P                  4      ^8X  dg   V P                  ^ ,          P                  \        P                  \        P                  39   d'   V P                  ^ ,          P                  VRRR4       MNVP                  V4       V P                   F  pVP                  WV,           W44       K  	  VP                  V4       VP                  RV P                  : RV: 24       R	# VP                  RV,          4       R	# )
zWrite an XML element to a file-like object

Write the element to the writer object that must provide
a write method (e.g. a file or StringIO object).
r   z %s="Tr   r   r   z</z/>%sN)r   r   _get_attributesr@  r   r  r2   r<  r&   r   rm   r   r(   )r   r-   r+   	addindentr,   r8  a_namer^   s   &&&&&   r   r(   Element.writexmlr  s<    	VCZ$,,./$$&jjlFLLF*+f 3 3T:LL # ???LLDOO$)"++(?(?0A A"++FBB?T" OODMM&*:IL ,V$LLdllD9:LL'r   c                d    V P                  4        \        V P                  V P                  V 4      # r0   )r  r4  r  r  r   s   &r   r  Element._get_attributes  s%    !DKK==r   c                .    V P                   '       d   R # R# r!  r  r   s   &r   hasAttributesElement.hasAttributes  s    ;;;r   c                J    V P                  V4      pV P                  V4       R # r0   )r  setIdAttributeNode)r   r   idAttrs   && r   setIdAttributeElement.setIdAttribute  s     &&t,'r   c                J    V P                  W4      pV P                  V4       R # r0   )r  r  )r   r   r   r	  s   &&& r   setIdAttributeNSElement.setIdAttributeNS  s     ((A'r   c                   Ve"   V P                  VP                  4      '       g   \        P                  P	                  4       h\        V 4      e   \        P                  P                  4       hVP                  '       gQ   RVn        V ;P                  ^,          un        V P                  ;P                  ^,          un
        \        V 4       R # R # )NT)r   r   rL   rM   rU   _get_containing_entrefNoModificationAllowedErrr  r  rx   r  rW   )r   r	  s   &&r   r  Element.setIdAttributeNode  s    >1D1D!E!E''%%''!$'3''2244}}} FM  A% ..!3.D!	 r   )r  r  r2   r   rY   r   rx   rP   r   rZ   r   )rx   rP   r   r   r   r   r   r2   r  r  rY   rZ   r   r   r   )1r   r   r   r   r/  r   rq   r&   r   r*  r2  r  r   r   rm   r   r   rK   r   r   r  r   r  ro   r  r  r  r  r  r  r  setAttributeNodeNSr  r  r  removeAttributeNodeNSr  r  r  r  r  r(   r  r  r
  r  r  r   r   r   s   @r   r  r    s    1I   HIJO**99**00335 .=T*
2 
&.")
<
& *'' 0#:
G7E(@>((	" 	"r   r  r   z*NamedNodeMap of attributes on the element.z%Namespace-local name of this element.c                     \        V 4       V P                  4        WP                  VP                  &   WP                  VP
                  VP                  3&   Wn        R # r0   )rW   r  r  r   r  r   r   r   )elementr   s   &&r   r  r    sK    G  $NN499<@d''89
  r   c                   r   a  ] tR tRt o RtRtRt]! 4       tRt	Rt
R tR tR tR tR tR	 tR
 tR tRtV tR# )	Childlessi  zyMixin that makes childless-ness easy to implement and avoids
the complexity of the Node methods that deal with children.
Nc                    R # r0   r   r   s   &r   r=   Childless._get_firstChild  r   r   c                    R # r0   r   r   s   &r   rC   Childless._get_lastChild  r   r   c                b    \         P                  P                  V P                  R ,           4      h)z nodes cannot have childrenrL   rM   rN   r   r  s   &&r   rR   Childless.appendChild  &    gg))MM99; 	;r   c                    R # Fr   r   s   &r   r3   Childless.hasChildNodes      r   c                b    \         P                  P                  V P                  R ,           4      hz nodes do not have childrenr  r   r[   r\   s   &&&r   rJ   Childless.insertBefore  r!  r   c                b    \         P                  P                  V P                  R ,           4      hr'  )rL   rM   rU   r   ri   s   &&r   rQ   Childless.removeChild  s&    gg!!MM99; 	;r   c                    R # r0   r   r   s   &r   rr   Childless.normalize  s    r   c                b    \         P                  P                  V P                  R ,           4      hr'  r  r   r[   rd   s   &&&r   re   Childless.replaceChild  r!  r   r   )r   r   r   r   r  r/  r   EmptyNodeListr2   r   r   r=   rC   rR   r3   rJ   rQ   rr   re   r   r   r   s   @r   r  r    sT      IJJJI;;;; ;r   r  c                      a  ] tR tRt o ]P
                  tR
tR tR t	R t
]! ]	]
4      tR tR t]! ]]4      tRR ltRtV tR	# )ProcessingInstructioni  c                    Wn         W n        R # r0   targetrn   )r   r6  rn   s   &&&r   r   ProcessingInstruction.__init__  s    	r   c                    V P                   # r0   rn   r   s   &r   _get_nodeValue$ProcessingInstruction._get_nodeValue  r  r   c                    Wn         R # r0   r9  r  s   &&r   _set_nodeValue$ProcessingInstruction._set_nodeValue  s    	r   c                    V P                   # r0   r6  r   s   &r   _get_nodeName#ProcessingInstruction._get_nodeName  r	  r   c                    Wn         R # r0   r@  r  s   &&r   _set_nodeName#ProcessingInstruction._set_nodeName  s    r   c           	     n    VP                  V: R V P                  : RV P                  : RV: 24       R# )z<?r  ?>N)r   r6  rn   r   r-   r+   r  r,   s   &&&&&r   r(   ProcessingInstruction.writexml  s    t{{DIItLMr   )rn   r6  Nr5  r  )r   r   r   r   r   r   r&   r/  r   r:  r=  r1  r   rA  rD  r   r(   r   r   r   s   @r   r3  r3    sR     //H"I
8I}5HN Nr   r3  c                   z   a  ] tR tRt o RtR tR t]tR tR t	]
! ]]	4      ;ttR tR tR tR	 tR
 tR tRtV tR# )CharacterDatai  c                v    R ;V n         V n        R ;V n        V n        RV n        \
        P                  V 4       R # r  )rx   rP   rZ   rY   _datar   r   r   s   &r   r   CharacterData.__init__  s4    /33T_266t/
dr   c                ,    \        V P                  4      # r0   )r<  rn   r   s   &r   r=  CharacterData._get_length      499~r   c                    V P                   # r0   rM  r   s   &r   	_get_dataCharacterData._get_data  r   r   c                    Wn         R # r0   rS  r   rn   s   &&r   	_set_dataCharacterData._set_data  s    
r   c                    V P                   p\        V4      ^
8  d   RpMRpRV P                  P                  : RVR,          : V: R2# )
   z...r   z<DOM z node ":r<   r[  Nz">)rn   r<  r  r   )r   rn   	dotdotdots   &  r   r  CharacterData.__repr__  s@    yyt9r>IINN##T$Z< 	<r   c                6   V^ 8  d    \         P                  P                  R4      hV\        V P                  4      8  d    \         P                  P                  R4      hV^ 8  d    \         P                  P                  R4      hV P                  WV,            # )r<   offset cannot be negative#offset cannot be beyond end of datacount cannot be negativerL   rM   IndexSizeErrr<  rn   r   offsetcounts   &&&r   substringDataCharacterData.substringData"  su    A:''&&'BCCS^#''&&'LMM19''&&'ABByyu--r   c                6    V P                   V,           V n         R # r0   r9  )r   args   &&r   
appendDataCharacterData.appendData+  s    IIO	r   c                ,   V^ 8  d    \         P                  P                  R4      hV\        V P                  4      8  d    \         P                  P                  R4      hV'       d-   V P                  RV : V: V P                  VR : 2V n        R# R# )r<   r_  r`  Nrb  )r   re  rj  s   &&&r   
insertDataCharacterData.insertData.  ss    A:''&&'BCCS^#''&&'LMM		'6"C67);=DI r   c                   V^ 8  d    \         P                  P                  R4      hV\        V P                  4      8  d    \         P                  P                  R4      hV^ 8  d    \         P                  P                  R4      hV'       d1   V P                  RV V P                  W,           R ,           V n        R# R# r<   r_  r`  ra  Nrb  rd  s   &&&r   
deleteDataCharacterData.deleteData7  s    A:''&&'BCCS^#''&&'LMM19''&&'ABB		'6*TYYv|}-EEDI r   c                   V^ 8  d    \         P                  P                  R4      hV\        V P                  4      8  d    \         P                  P                  R4      hV^ 8  d    \         P                  P                  R4      hV'       d3   V P                  RV : V: V P                  W,           R : 2V n        R# R# rq  rb  )r   re  rf  rj  s   &&&&r   replaceDataCharacterData.replaceDataA  s    A:''&&'BCCS^#''&&'LMM19''&&'ABB		'6"C6<=)ACDI r   )rM  rn   rY   rx   rP   rZ   N)rM  rx   rP   rZ   rY   )r   r   r   r   r/  r   r=  r  rT  rX  r1  rn   r   r  rg  rk  rn  rr  ru  r   r   r   s   @r   rK  rK    s\     WIG  	955D9<.$=F	C 	Cr   rK  zLength of the string data.c                   f   a  ] tR tRt o R
t]P                  tRtRt	R t
RR ltR tR tR tR	tV tR# )r   iO  z#textNc                   V^ 8  g   V\        V P                  4      8  d    \        P                  P	                  R4      hV P                  4       pV P                  VR Vn        V P                  Vn        V P                  pV P                  '       dV   W P                  P                  9   d<   Vf   V P                  P                  V4       MV P                  P                  W#4       V P                  RV V n        V# )r<   zillegal offset valueN)r<  rn   rL   rM   rc  r  rx   rY   rP   r2   rR   rJ   )r   re  newTextnexts   &&  r   	splitTextText.splitTextV  s    A:#dii.0''&&'=>>.."yy) $ 2 2???t'A'AA|++G4,,W;IIgv&	r   c                D    \        W: V P                  : V: 2R 4       R# )FN)r   rn   rH  s   &&&&&r   r(   Text.writexmle  s    F		4@%Hr   c                   V P                   .pV P                  pVe[   VP                  \        P                  \        P
                  39   d+   VP                  ^ VP                   4       VP                  pK]   V P                  pVeZ   VP                  \        P                  \        P
                  39   d*   VP                  VP                   4       VP                  pK\   RP                  V4      # r  )
rn   rZ   r&   r   rm   r   rX   rY   rp   join)r   rs   r  s   &  r   _get_wholeTextText._get_wholeTextj  s    YYK  mzzdnnd.E.EFFAFF#%%mzzdnnd.E.EFF MMwwqzr   c                   V P                   pV P                  pVeR   VP                  \        P                  \        P
                  39   d"   VP                  pVP                  V4       TpKT   V P                  pV'       g   VP                  V 4       VeR   VP                  \        P                  \        P
                  39   d"   VP                  pVP                  V4       TpKT   V'       d	   Wn        V # R # r0   )	rP   rZ   r&   r   rm   r   rQ   rY   rn   )r   contentr   r  rz  s   &&   r   replaceWholeTextText.replaceWholeText|  s       mzzdnnd.E.EFF((""1%t$mzzdnnd.E.EFF}}""1%IKr   c                    V P                   P                  4       '       d   R # \        V 4      pVf   R # V P                  P	                  V4      pVf   R # VP                  4       # r#  )rn   strip_get_containing_elementrx   r"  isElementContent)r   r  r&  s   &  r   !_get_isWhitespaceInElementContent&Text._get_isWhitespaceInElementContent  sU    99??&t,<!!006<((**r   r9  r   r  )r   r   r   r   r/  r   rm   r&   r   r   r{  r(   r  r  r  r   r   r   s   @r   r   r   O  s<     I~~HHJI
$8
+ 
+r   r   isWhitespaceInElementContentzKTrue iff this text node contains only whitespace and is in element content.	wholeTextz.The text of all logically-adjacent text nodes.c                     V P                   pVe0   VP                  \        P                  8X  d   V# VP                   pK3  R # r0   )rP   r&   r   rq   r^   r]   s   & r   r  r    s3    A
-::***HLLr   c                     V P                   pVe0   VP                  \        P                  8X  d   V# VP                   pK3  R # r0   )rP   r&   r   r   r  s   & r   r  r    s3    A
-::333HLLr   c                   L   a  ] tR tRt o ]P
                  tRtR tRR lt	Rt
V tR# )Commenti  z#commentc                <    \         P                  V 4       Wn        R # r0   )rK  r   rM  rW  s   &&r   r   Comment.__init__  s    t$
r   c                    R V P                   9   d   \        R4      hVP                  V: RV P                   : RV: 24       R# )z--z%'--' is not allowed in a comment nodez<!--z-->N)rn   rT   r   rH  s   &&&&&r   r(   Comment.writexml  s1    499DEE		4@Ar   rS  Nr  )r   r   r   r   r   r   r&   r   r   r(   r   r   r   s   @r   r  r    s&       HHB Br   r  c                   J   a  ] tR tRt o Rt]P                  tRtRR lt	Rt
V tR# )CDATASectioni  z#cdata-sectionc                    V P                   P                  R 4      ^ 8  d   \        R4      hVP                  RV P                   ,          4       R# )z]]>z$']]>' not allowed in a CDATA sectionz<![CDATA[%s]]>N)rn   findrT   r   rH  s   &&&&&r   r(   CDATASection.writexml  s9    99>>% A%CDD%		12r   r   Nr  )r   r   r   r   r/  r   r   r&   r   r(   r   r   r   s   @r   r  r    s$     I&&HH3 3r   r  c                   v   a  ] tR tRt o RtRR ltR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tRtV tR# )ReadOnlySequentialNamedNodeMapi  c                    Wn         R # r0   _seq)r   seqs   &&r   r   'ReadOnlySequentialNamedNodeMap.__init__  s    	r   c                ,    \        V P                  4      # r0   r<  r  r   s   &r   r  &ReadOnlySequentialNamedNodeMap.__len__  rQ  r   c                ,    \        V P                  4      # r0   r  r   s   &r   r=  *ReadOnlySequentialNamedNodeMap._get_length  rQ  r   c                V    V P                    F  pVP                  V8X  g   K  Vu # 	  R # r0   )r  r   r  s   && r   r  +ReadOnlySequentialNamedNodeMap.getNamedItem  s!    AzzT! r   c                |    V P                    F+  pVP                  V8X  g   K  VP                  V8X  g   K)  Vu # 	  R # r0   )r  r   r   r  s   &&& r   r  -ReadOnlySequentialNamedNodeMap.getNamedItemNS  s,    A~~-!++2J r   c                    \        V\        4      '       d   V P                  ! V!  pMV P                  V4      pVf   \	        V4      hV# r0   )rM  rI   r  r  r   )r   name_or_tupler^   s   && r   rv  *ReadOnlySequentialNamedNodeMap.__getitem__  sD    mU++&&6D$$]3D<=))r   c                `    V^ 8  d   R#  V P                   V,          #   \         d     R# i ; ir;   )r  rA  rB  s   &&r   rC  #ReadOnlySequentialNamedNodeMap.item  s2    19	99U## 		s    --c                @    \         P                  P                  R 4      hz"NamedNodeMap instance is read-onlyrL   rM   r  r  s   &&r   r  .ReadOnlySequentialNamedNodeMap.removeNamedItem      gg..02 	2r   c                @    \         P                  P                  R 4      hr  r  r  s   &&&r   r  0ReadOnlySequentialNamedNodeMap.removeNamedItemNS  r  r   c                @    \         P                  P                  R 4      hr  r  r  s   &&r   ry  +ReadOnlySequentialNamedNodeMap.setNamedItem  r  r   c                @    \         P                  P                  R 4      hr  r  r  s   &&r   r  -ReadOnlySequentialNamedNodeMap.setNamedItemNS
  r  r   c                    V P                   .# r0   r  r   s   &r   r  +ReadOnlySequentialNamedNodeMap.__getstate__  s    		{r   c                "    V^ ,          V n         R# r;   r  r  s   &&r   r  +ReadOnlySequentialNamedNodeMap.__setstate__  s    !H	r   r  N)r   )r   r   r   r   r/  r   r  r=  r  r  rv  rC  r  r  ry  r  r  r  r   r   r   s   @r   r  r    sP     I

2222 r   r  z&Number of entries in the NamedNodeMap.c                   :   a  ] tR tRt o RtRtR tR tR tRt	V t
R# )
Identifiedi  z@Mix-in class that supports the publicId and systemId attributes.c                    Wn         W n        R # r0   publicIdsystemId)r   r  r  s   &&&r   _identified_mixin_init!Identified._identified_mixin_init  s      r   c                    V P                   # r0   )r  r   s   &r   _get_publicIdIdentified._get_publicId!      }}r   c                    V P                   # r0   )r  r   s   &r   _get_systemIdIdentified._get_systemId$  r  r   r  N)r   r   r   r   r  r/  r  r  r  r   r   r   s   @r   r  r    s!     J&I! r   r  c                   h   a  ] tR tRt o ]P
                  tRtRtRt	Rt
RtR tR tR tRR ltRtV tR# )	DocumentTypei'  Nc                    \        4       V n        \        4       V n        V'       d   \        V4      w  r#W0n        V P                  V n        R # r0   )r  entities	notationsr  r   r   )r   r  r   r  s   &&  r   r   DocumentType.__init__/  s6    6879 ( 7F!I		r   c                    V P                   # r0   )internalSubsetr   s   &r   _get_internalSubset DocumentType._get_internalSubset7      """r   c                   V P                   Ef   \        R 4      pV P                  Vn        V P                  Vn        \        P
                  P                  P                  pV'       Ed_   . VP                  n	        . VP                  n	        V P                  P                   Fe  p\        VP                  VP                  VP                  4      pVP                  P                  P                  V4       VP                  W4V4       Kg  	  V P                  P                   F  p\!        VP                  VP                  VP                  VP"                  4      pVP$                  Vn        VP&                  Vn        VP(                  Vn        VP                  P                  P                  V4       VP                  W6V4       K  	  V P                  W0V4       V# R # r0   )rx   r  r   r   rL   rM   UserDataHandlerNODE_CLONEDr  r  r  Notationr  r  rp   r   EntitynotationNameactualEncodingr   r   )r   ry   cloner   r  notationeentitys   &&      r   rz   DocumentType.cloneNode:  sU   % &EEJ!YYEN//;;It&(#')$,,A'

AJJ

KHOO((//9--iHE - ++A#AJJ

AJJ$%NN4F,-,<,<F)&'jjFO%&YYFNNN''..v6--iFC , ((%@Lr   c           
        VP                  R 4       VP                  V P                  4       V P                  '       d7   VP                  V: RV P                  : RV: RV P                  : R24       M5V P                  '       d$   VP                  V: RV P                  : R24       V P                  e>   VP                  R4       VP                  V P                  4       VP                  R4       VP                  RV,           4       R# )	z
<!DOCTYPE z
  PUBLIC ''z  'z
  SYSTEM 'Nz []r   )r   r   r  r  r  rH  s   &&&&&r   r(   DocumentType.writexmlU  s    \"TYY===LL $--t}}F G]]]LLdDMMBC*LLLL,,-LLSXr   )r  r   r   r  r  )r   r   r   r   r   DOCUMENT_TYPE_NODEr&   r   r   r  r  r  r   r  rz   r(   r   r   r   s   @r   r  r  '  sB     &&HIDHHN"#6 r   r  c                   |   a  ] tR tRt o Rt]P                  tRtRt	Rt
RtR tR tR tR tR tR tR	 tR
 tRtV tR# )r  ic  Nc                ^    Wn         W@n        \        4       V n        V P	                  W#4       R # r0   )r   r  r   r2   r  )r   r   r  r  r  s   &&&&&r   r   Entity.__init__l  s$    $"*##H7r   c                    V P                   # r0   r  r   s   &r   _get_actualEncodingEntity._get_actualEncodingr  r  r   c                    V P                   # r0   r   r   s   &r   _get_encodingEntity._get_encodingu  r  r   c                    V P                   # r0   r   r   s   &r   _get_versionEntity._get_versionx  r  r   c                @    \         P                  P                  R 4      h)z(cannot append children to an entity noderL   rM   rN   )r   r[   s   &&r   rR   Entity.appendChild{  s    gg))68 	8r   c                @    \         P                  P                  R 4      h)z+cannot insert children below an entity noder  r(  s   &&&r   rJ   Entity.insertBefore  s    gg))9; 	;r   c                @    \         P                  P                  R 4      h)z*cannot remove children from an entity noder  ri   s   &&r   rQ   Entity.removeChild  s    gg))8: 	:r   c                @    \         P                  P                  R 4      h)z)cannot replace children of an entity noder  r/  s   &&&r   re   Entity.replaceChild  s    gg))79 	9r   )r2   r   r  )r   r   r   r   r   r   ENTITY_NODEr&   r   r  r   r   r   r  r  r  rR   rJ   rQ   re   r   r   r   s   @r   r  r  c  sV     JHINHG8#8;:9 9r   r  c                   B   a  ] tR tRt o ]P
                  tRtR tRt	V t
R# )r  i  Nc                4    Wn         V P                  W#4       R # r0   )r   r  )r   r   r  r  s   &&&&r   r   Notation.__init__  s    ##H7r   )r   )r   r   r   r   r   r   r&   r   r   r   r   r   s   @r   r  r    s     !!HI8 8r   r  c                   F   a  ] tR tRt o . R	OtR tR tR tR tR t	Rt
V tR# )
DOMImplementationi  Nc                R    VR 8X  d   RpVP                  4       V3V P                  9   # )r   N)lower	_featuresr   s   &&&r   r~   DOMImplementation.hasFeature  s(    b=G)T^^;;r   c                   V'       d.   VP                   e    \        P                  P                  R4      hV P	                  4       pVR J ;'       d    VR J ;'       d    VR J '       * pV'       g(   V'       d    \        P                  P                  R4      hV'       d   \        V4      w  rgVR8X  d'   VR8w  d    \        P                  P                  R4      hV'       d(   V'       g    \        P                  P                  R4      hVP                  W4      pV'       d   VP                  V4       VP                  V4       V'       d   V;Vn         Vn
        W4n        Wn        V# )Nz(doctype object owned by another DOM treezElement with no namerL   z$http://www.w3.org/XML/1998/namespacezillegal use of 'xml' prefixz(illegal use of prefix without namespaces)rP   rL   rM   WrongDocumentErr_create_documentInvalidCharacterErrr  r  createElementNSrR   rx   doctyper}   )	r   r   r  r  r   add_root_elementr   r  r  s	   &&&&     r   createDocument DOMImplementation.createDocument  s0   w))5''**:< <##% , 4 !4 !4$1T$9!4 !4$+tO5 !1 ''--.DEE ( 7F#IIgg**+HIIlgg**>@ @)),FG(OOG$9<<G!6!
r   c                4    \        V4      pW$n        W4n        V# r0   )r  r  r  )r   r  r  r  r  s   &&&& r   createDocumentType$DOMImplementation.createDocumentType  s    }-##r   c                :    V P                  VR 4      '       d   V # R # r0   )r~   r   s   &&r   r   DOMImplementation.getInterface  s    ??7D))Kr   c                    \        4       # r0   )Documentr   s   &r   r  "DOMImplementation._create_document  s
    zr   r   ))core1.0)r  2.0)r  N)rL   r   )rL   r!  )rL   N)ls-loadz3.0)r"  N)r   r   r   r   r  r~   r  r  r   r  r   r   r   s   @r   r	  r	    s+     I<
+Z r   r	  c                   ^   a  ] tR tRt o RtRtR tR tR tR t	R t
R tR	 tR
 tR tRtV tR# )ElementInfoi  zObject 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.

c                    Wn         R # r0   r  r  s   &&r   r   ElementInfo.__init__  s    r   c                    \         # r0   r*  r   anames   &&r   r,  ElementInfo.getAttributeType      r   c                    \         # r0   r(  r  s   &&&r   r+  ElementInfo.getAttributeTypeNS  r,  r   c                    R # r#  r   r   s   &r   r  ElementInfo.isElementContent  r%  r   c                    R# )zIReturns true iff this element is declared to have an EMPTY
content model.Fr   r   s   &r   isEmptyElementInfo.isEmpty  s     r   c                    R# )z7Returns true iff the named attribute is a DTD-style ID.Fr   r)  s   &&r   r$  ElementInfo.isId      r   c                    R# )z<Returns true iff the identified attribute is a DTD-style ID.Fr   r  s   &&&r   r#  ElementInfo.isIdNS  r6  r   c                    V P                   # r0   r  r   s   &r   r  ElementInfo.__getstate__  r  r   c                    Wn         R # r0   r  r  s   &&r   r  ElementInfo.__setstate__
  s    r   r  N)r   r   r   r   r  r/  r   r,  r+  r  r2  r$  r#  r  r  r   r   r   s   @r   r$  r$    sC      I
 r   r$  c                    V P                   \        P                  8X  d$   V P                  P	                  4        R V n        R # V P                  '       d8   V P                  P                  P	                  4        R V P                  n        R # R # r0   )r&   r   r'   	_id_cacheclear_id_search_stackrx   )r^   s   &r   rW   rW     sc    }}*** $				$$**,-1+ 
r   c                     a  ] tR tRt o R't]P                  ]P                  ]P                  ]P                  3t
]! 4       t]P                  tRtRtRtRtR;ttRtRtRtRtRtRtRt^ tR tR tR tR t R	 t!R
 t"R t#R t$R t%R t&R t'R t(R t)R t*R t+R t,R t-R t.R t/R t0R t1R t2R t3R t4R t5R t6R t7R  t8R! t9R" t:R# t;R(R$ lt<R% t=R&t>V t?R# ))r  i  z	#documentNFc                \    R V n         \        4       V n        / V n        / V n        R V n        R # r0   )r  r   r2   
_elem_infor>  r@  r   s   &r   r   Document.__init__0  s*    "*  $r   c                    VP                   '       d   VP                   VP                  3pMVP                  pV P                  P	                  V4      # r0   )r   r   r   rC  rZ  )r   r  r   s   && r   r"  Document._get_elem_info9  sB    &&(9(99C//C""3''r   c                    V P                   # r0   r  r   s   &r   r  Document._get_actualEncoding@  r  r   c                    V P                   # r0   )r  r   s   &r   _get_doctypeDocument._get_doctypeC  r  r   c                    V P                   # r0   )documentURIr   s   &r   _get_documentURIDocument._get_documentURIF  s    r   c                    V P                   # r0   r  r   s   &r   r  Document._get_encodingI  r  r   c                    V P                   # r0   )errorHandlerr   s   &r   _get_errorHandlerDocument._get_errorHandlerL  s       r   c                    V P                   # r0   )r   r   s   &r   _get_standaloneDocument._get_standaloneO  r9   r   c                    V P                   # r0   )strictErrorCheckingr   s   &r   _get_strictErrorChecking!Document._get_strictErrorCheckingR  s    '''r   c                    V P                   # r0   r  r   s   &r   r  Document._get_versionU  r  r   c                   VP                   V P                  9  d9   \        P                  P	                  \        V4      : R \        V 4      : 24      hVP                  e   VP                  P                  V4       VP                   \        P                  8X  d6   V P                  4       '       d    \        P                  P	                  R4      h\        P                  W4      # )rG   z two document elements disallowed)r&   rK   rL   rM   rN   rO   rP   rQ   r   rq   _get_documentElementrR   r  s   &&r   rR   Document.appendChildX  s    == 6 66''--.24j$t*EG G??& OO''-==D---((**''--24 4++r   c                     V P                   P                  V4       R ;Tn        Tn        R Tn        T P                  TJ d   R T n	        T#   \         d     \        P                  P                  4       hi ; ir0   )
r2   rh   rT   rL   rM   rU   rY   rZ   rP   documentElementri   s   &&r   rQ   Document.removeChildh  sr    	(OO""8, ;?>x7"8+#'D   	(''%%''	(s   A *A5c                r    V P                    F&  pVP                  \        P                  8X  g   K$  Vu # 	  R # r0   )r2   r&   r   rq   r  s   & r   r`  Document._get_documentElementt  s'    OOD}} 1 11 $r   c                    V P                   e"   V P                   P                  4        R V n         \        P                  V 4       R # r0   )r  ro   r   r   s   &r   ro   Document.unlinky  s/    <<#LL!DLDr   c                   V'       g   R # V P                   P                  R R R 4      pV P                  Vn        V P                  Vn        V P                  Vn        V P
                   F  p\        W1V4      pVP                  P                  V4      '       g   Q hVP
                  P                  V4       VP                  \        P                  8X  d   VP                  e   Q hM5VP                  \        P                  8X  d   VP                  e   Q hWBn        W$n        K  	  V P#                  \$        P&                  P(                  P*                  W4       V# r0   )r}   r  r   r   r   r2   rw   rx   r   rp   r&   r   r'   rc  r  r  rP   r   rL   rM   r  r  )r   ry   r  r  
childclones   &&   r   rz   Document.cloneNode  s   ##224tD??A$Qe4J++66u====##J/""d&8&88,,444$$(?(??}},,, *$)! ! 	$$SWW%<%<%H%H%)	2r   c                &    \        4       pWn        V# r0   )r   rx   )r   r   s   & r   createDocumentFragmentDocument.createDocumentFragment  s    r   c                (    \        V4      pWn        V# r0   )r  rx   )r   r   r  s   && r   createElementDocument.createElement  s    Gr   c                t    \        V\        4      '       g   \        R 4      h\        4       pWn        Wn        V# znode contents must be a string)rM  rN  rz  r   rn   rx   )r   rn   ts   && r   createTextNodeDocument.createTextNode  s1    $$$<==Fr   c                t    \        V\        4      '       g   \        R 4      h\        4       pWn        Wn        V# rs  )rM  rN  rz  r  rn   rx   r   rn   r]   s   && r   createCDATASectionDocument.createCDATASection  s1    $$$<==Nr   c                (    \        V4      pWn        V# r0   )r  rx   rx  s   && r   createCommentDocument.createComment  s    DMr   c                (    \        W4      pWn        V# r0   )r3  rx   )r   r6  rn   ps   &&& r   createProcessingInstruction$Document.createProcessingInstruction  s    !&/r   c                6    \        V4      pWn        R Vn        V# r   )r   rx   r  )r   r   as   && r   createAttributeDocument.createAttribute  s    Kr   c                D    \        V4      w  r4\        W!V4      pWn        V# r0   )r  r  rx   )r   r   r  r   r   r  s   &&&   r   r  Document.createElementNS  s%    $]3M8r   c                R    \        V4      w  r4\        W!WC4      pWn        R Vn        V# r   )r  r   rx   r  )r   r   r  r   r   r  s   &&&   r   createAttributeNSDocument.createAttributeNS  s,    $]3i@r   c                *    \        WW44      pWn        V# r0   )r  rx   )r   r   r  r  r  r  s   &&&&& r   _create_entityDocument._create_entity  s    48:r   c                *    \        WV4      pWn        V# r0   )r  rx   )r   r   r  r  r  s   &&&& r   _create_notationDocument._create_notation  s    TX.r   c                   WP                   9   d   V P                   V,          # V P                  '       g   V P                  '       g   R # V P                  pVf   V P                  .pW n        M
V'       g   R # R pV'       EdM   VP                  4       pTP                  VP                   Uu. uF  pVP                  \        9   g   K  VNK  	  up4       V P                  V4      pV'       Edc   VP                  P                  4        EFB  pVP                  '       ds   VP                  VP                  VP                  4      '       dE   W@P                   VP                   &   VP                   V8X  d   TpKo  VP"                  '       g    EM8K  K  VP%                  VP&                  4      '       dD   W@P                   VP                   &   VP                   V8X  d   TpK  VP"                  '       g    MK  VP(                  '       g   EK  W@P                   VP                   &   VP                   V8X  d   TpEK/  VP"                  ^8X  g   EKC   Mw	  MtVP"                  '       dc   VP                  P                  4        FD  pVP(                  '       g   K  W@P                   VP                   &   VP                   V8X  g   KB  TpKF  	  Vf   EKR   V# V# u upi r0   )r>  rC  r  r@  rc  popextendr2   r&   rV   r"  r   rF  r   r#  r   r  r  r$  r   r  )r   r^  stackresultr^   rt   r&  r   s   &&      r   getElementByIdDocument.getElementById  s.   >>"%%4#7#7#7%%=))*E$)! e99;DLLT__ I_E"^^/GG  %_ I J &&t,Dt !OO224D(((;;t'8'8$..II9=NN4::6#zzR/)-%)%9%9%9 % &:	 J 499--59tzz2::+%)F!%!5!5!5! "659tzz2::+%)F!11Q6!' 5( %%% OO224D{{{59tzz2::+%)F	 5
 !vIIs   ,KKc                *    \        W\        4       4      # r0   r  r  s   &&r   r  Document.getElementsByTagName  s    .t8:FFr   c                ,    \        WV\        4       4      # r0   r  r  s   &&&r   r  Document.getElementsByTagNameNS  r  r   c                8    V P                   P                  W4      # r0   )r}   r~   r   s   &&&r   r   Document.isSupported  s    ""--g??r   c                   VP                   \        P                  8X  d    \        P                  P                  R 4      hVP                   \        P                  8X  d    \        P                  P                  R4      h\        WV 4      # )zcannot import document nodesz!cannot import document type nodes)r&   r   r'   rL   rM   NotSupportedErrr  rw   )r   r^   ry   s   &&&r   
importNodeDocument.importNode  s_    ==D...''))*HII]]d555''))*MNN4t,,r   c                    . pV'       d   VP                  R V R24       Ve    TP                  RV'       d   RMR R24       VP                  RRP                  V4       RV 24       V P                   F  pVP	                  WW44       K  	  R# )	z
encoding="r   Nzstandalone="yesnoz<?xml version="1.0" r  rG  )rp   r   r  r2   r(   )	r   r-   r+   r  r,   r   r   declarationsr^   s	   &&&&&&&  r   r(   Document.writexml#  s    *XJa 89!,
u.MQ OP+CHH\,B+C2dVLMOODMM&): $r   c                Z   VP                   V Jd2   \        P                  P                  R V : RVP                   : 24      hVP                  \
        P                  \
        P                  39  d    \        P                  P                  R4      hV\        8w  d   RV9   d[   VP                  R^4      w  rEVR8X  d?   V\        P                  P                  8w  d    \        P                  P                  R4      hMmVR8X  d^   V\        P                  P                  8w  d?   VP                  \
        P                  8X  d    \        P                  P                  R4      hRpTpMRpRpVP                  \
        P                  8X  d/   VP                  pVe   VP                  pVP                  V4       MRpWAn        WQn        W!n        W1n        VP                  \
        P                  8X  d	   W1n        V# W1n        Ve+   VP-                  V4       X'       d   VP/                  V4       V# )z3cannot rename nodes from other documents;
expected z,
found z8renameNode() only applies to element and attribute nodesr   r  zillegal use of 'xmlns' prefixz$illegal use of the 'xmlns' attributeN)rx   rL   rM   r  r&   r   rq   r0  r  r   r   r   r  r   r  r  r   r   r   r   r   r   r  r  )r   r  r   r   r   r   r  is_ids   &&&&    r   
renameNodeDocument.renameNode3  s   ??$&''**,0!//CD D ::d//1D1DEE''))JL L?*d{$(JJsA$6!'&#''*A*AA''..79 9 go&#''*A*AA**(;(;;''..>@ @ 	FI::,,,nnG"++A.G %
::***I  F"((+..q1 r   )rC  r>  r@  r2   r  rc  )rC  r  r@  r2   r>  )r   r   r   NN)@r   r   r   r   r/  r   rq   r   r   r  rK   r	  r}   r'   r&   r   r   r   rP   rZ   rY   r  r   r   r   rZ  rS  rM  r  r   r"  r  rJ  rN  r  rT  rW  r[  r  rR   rQ   r`  ro   rz   rm  rp  ru  ry  r|  r  r  r  r  r  r  r  r  r  r   r  r(   r  r   r   r   s   @r   r  r    sC    @I**D,L,L**D,C,CE '(N!!HHIJJ$((Ok
 NHJGLKO%(# !(, 

*





8tG7@-; 3 3r   r  rc  z#Top-level element of this document.c                |   V P                   P                  V4      '       d&   \        P                  P                  P
                  pM$\        P                  P                  P                  pV P                  \        P                  8X  d   VP                  V P                  V P                  4      pV P                  P                  4        Fk  pVP                  VP                  VP                  VP                   4       VP#                  VP                  VP$                  4      pVP&                  Vn        Km  	  V'       d1   V P(                   F   p\+        WqV4      pVP-                  V4       K"  	  EM%V P                  \        P.                  8X  dK   VP1                  4       pV'       d1   V P(                   F   p\+        WqV4      pVP-                  V4       K"  	  EMV P                  \        P2                  8X  d   VP5                  V P6                  4      pEMV P                  \        P8                  8X  d   VP;                  V P6                  4      pEMDV P                  \        P<                  8X  d)   VP?                  V P@                  V P6                  4      pEMV P                  \        PB                  8X  d   VPE                  V P6                  4      pEMV P                  \        PF                  8X  dA   VPI                  V P                  V P                  4      pRVn        V P                   Vn        EMbV P                  \        PJ                  8X  Ed   V P                   VJg   Q h\        P                  P                  P                  pVPL                  PO                  V PP                  V PR                  V PT                  4      pW$n         V'       Ed   . VPV                  n,        . VPZ                  n,        V PZ                  PX                   F  p	\]        V	P                  V	PR                  V	PT                  4      p
W*n         VPZ                  PX                  P_                  V
4       \a        V	R4      '       g   Km  V	Pc                  W9V
4       K  	  V PV                  PX                   F  p\e        VP                  VPR                  VPT                  VPf                  4      pVPh                  Vn4        VPj                  Vn5        VPl                  Vn6        W,n         VPV                  PX                  P_                  V4       \a        VR4      '       g   K  VPc                  W;V4       K  	  M/\        P                  Po                  R\q        V 4      ,          4      h\a        V R4      '       d   V Pc                  W0V4       V# )zc
Clone a node and give it the new owner document.
Called by Node.cloneNode and Document.importNode
Tr   zCannot clone node %s)9rx   r   rL   rM   r  r  NODE_IMPORTEDr&   r   rq   r  r   r   r   rF  r  r  r  r   r   r2   rw   rR   rH   rm  rm   ru  rn   r   ry  r   r  r6  r   r|  r0  r  r  r}   r  r   r  r  r  r  r  r  rp   r   r   r  r  r  r   r   r  rO   )r^   ry   newOwnerDocumentr   r  r   r  rt   r]   r  r  r  r  s   &&&          r   rw   rw   l  s   
 $$%566GG++77	GG++99	}}))) 001B1B15@OO**,D  !2!2DMM4::N(():):DNNKA..AK -
 -=>!!!$ ) 
$55	5 779-=>!!!$ ) 
$..	( //		:	$11	1 33DII>	$::	: <<T[[=AYYH	$++	+ ..tyy9	$--	- 2243D3D37==Bjj	$11	1!!)9999GG++99	 //BBIIt}}dmm5.4"$ENN#%EOO ^^((#AJJ

AJJG)9&$$++H51788--iHE ) ]]''

AJJ

 !0()(8(8%"#**!"'7$##**621788--iFC ( gg%%&<tDz&IJJ
 t.//$$Ye<Lr   c                 `    V P                  R ^4      p\        V4      ^8X  d   V# RV^ ,          3# )r   N)r   r<  )r  fieldss   & r   r  r    s4      a(F
6{afQi  r   c                 |    V ! V/ VB pVP                  4       w  rEVP                  V4       VP                  4        V# r0   )getEvent
expandNoder?  )funcargskwargseventstoktyperootNodes   &&&   r   _do_pulldom_parser    s<    4"6"F)G
h
LLNOr   c                    Vf    V'       g   ^ RI Hp VP                  V 4      # ^ RI Hp \	        VP                  V 3RVRV/4      # )z3Parse a file into a DOM by filename or file object.expatbuilderpulldomparserbufsize)xml.domr  parser  r  )filer  r  r  r  s   &&&  r   r  r    sC    ~g(!!$''# vy'24 	4r   c                x    Vf   ^ RI Hp VP                  V 4      # ^ RI Hp \	        VP                  V 3RV/4      # )z&Parse a file into a DOM from a string.r  r  r  )r  r  parseStringr  r  )stringr  r  r  s   &&  r   r  r    s?    ~(''//# !4!4vi"*F!35 	5r   c                     V '       d`   \        V \        4      '       d   \        P                  ! V 4      p V  F-  w  r\        P
                  P                  W4      '       d   K,   R # 	  \        P
                  # r0   )rM  rN  r   _parse_feature_stringr  r}   r~   )featuresfvs   &  r   getDOMImplementationr    sV    h$$33H=HDA**55a;;  """r   r   r0   )6r  r"   r  rL   r   r   r   r   xml.dom.minicompatxml.dom.xmlbuilderr   r	   rM   r   rq   r   rV   defpropertyra   r   r   r   r   r   objectr4  AttributeListr  r*  r  r  r  r3  rK  r   r  r  r  r  r  r  r  r  r  r	  r$  rW   r  rw   r  r  r  r  r  r   r   r   <module>r     s  " 
  J J   >  GGLL55GGLL>>@ t377<< tl D,$@ A D+$? @ D+$H I.%t %$z84 z8x D&$F G D+$M N D,$E Fa?6 a?F L(68 v ( D$M"d M"^ G\<> G[79	 &; &;RNIt N4ECIt ECN M8)E FS+= S+j D0./ D+@BBm B	34 	3<V <| *H8: ::y$ :x&9Z &9P8z9d 8M+ M^(& (T2QtZ Qf
 H'57Od!45#r   