%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/xml/dom/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/xml/dom/minidom.pyc


Pac@sdZddlZddlmZmZmZmZddlTddlm	Z	m
Z
ejjj
ejjjfZdejjfdYZeedd	d
eedd	deed
d	ddZdZdZdZdZdefdYZdefdYZeedd	deed
d	deedd	ddefdYZeedd	d eZd!efd"YZeeeZd#efd$YZeed%d	d&eed
d	d'd(Zd)fd*YZ d+e efd,YZ!d-e efd.YZ"ee"dd	d/d0e"fd1YZ#ee#d2d	d3ee#d4d	d5d6Z$d7Z%d8e e"fd9YZ&d:e#fd;YZ'd<efd=YZ(ee(dd	d>d?fd@YZ)dAe)e efdBYZ*dCe)efdDYZ+dEe)e efdFYZ,dGe	fdHYZ-dIefdJYZ.dKZ/dLee
fdMYZ0ee0dNd	dOdPZ1dQZ2dRZ3dSZ4eedTZ5edUZ6edVZ7dS(WscSimple 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
iN(tEMPTY_NAMESPACEtEMPTY_PREFIXtXMLNS_NAMESPACEtdomreg(t*(tDOMImplementationLSt
DocumentLStNodecBseZdZdZdZdZdZeZ	dZ
ddZddddZdZ
dZdZdZd	Zd
ZdZdZd
ZdZdZdZdZdZdZdZdZdZRS(cCstS(N(tTrue(tself((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt__nonzero__*scCs|jdd|S(Nt(ttoprettyxml(R	tencoding((s+/usr/local/lib/python2.7/xml/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((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR0s	cCs|jr
tStSdS(N(t
childNodesRtFalse(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt
hasChildNodes?s	cCs|jS(N(R(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_childNodesEscCs|jr|jdSdS(Ni(R(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_firstChildHs	cCs|jr|jdSdS(Ni(R(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_lastChildLs	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
parentNodeRtremoveChildtappendChildtindext
ValueErrortNotFoundErrt_nodeTypes_with_childrent_clear_id_cachetinserttnextSiblingtpreviousSibling(R	tnewChildtrefChildtcR+tnode((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR"Ps6	"

					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.R/R(RR)t
_append_childR1(R	R6R5((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR*ps	"

	cCs|j|jkr8|j}|j||j||S|j|jkrutjjdt	|t	|fn||krdS|j
dk	r|j
j|ny|jj
|}Wn tk
rtjjnX||j|<||_
d|_
|jtks|jtkr*t|n|j|_|j|_d|_d|_|jrl||j_n|jr||j_n|S(Ns%s cannot be child of %s(RR R1R)R"R#R$R%R&R'R(RRR+R,R-R.R/R2(R	R3toldChildR4R+((s+/usr/local/lib/python2.7/xml/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-R1RR2RR.R/R((R	R8((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR)s

	cCs*g}x|jD]}|jtjkr|jsr|rJ|j|d_n|jre|j|j_n|jq|r|dj|jkr|d}|j|j|_|j|_|jr||j_n|jq|j|q|j||jtj	kr|j
qqW||j(dS(Ni(RRRt	TEXT_NODEtdataR1R2tunlinktappendtELEMENT_NODEt	normalize(R	tLtchildR6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR@s*		

	

cCst|||jp|S(N(t_clone_nodet
ownerDocument(R	tdeep((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt	cloneNodescCs|jjj||S(N(RDtimplementationt
hasFeature(R	tfeaturetversion((s+/usr/local/lib/python2.7/xml/dom/minidom.pytisSupportedscCsdS(N(R(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_localNamescCs
||kS(N((R	tother((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt
isSameNodescCs|j|dr|SdSdS(N(RKR(R	RI((s+/usr/local/lib/python2.7/xml/dom/minidom.pytgetInterfacescCs2y|j|dSWnttfk
r-dSXdS(Ni(t
_user_datatAttributeErrortKeyErrorR(R	tkey((s+/usr/local/lib/python2.7/xml/dom/minidom.pytgetUserDatascCsd}y
|j}Wn tk
r5i}||_nX||krS||d}n|dkr~d}|dk	r||=qn||f||<|S(Ni(RRPRQ(R	RSR<thandlertoldtd((s+/usr/local/lib/python2.7/xml/dom/minidom.pytsetUserDatas



cCsdt|dr`xN|jjD]:\}\}}|dk	r|j|||||qqWndS(NRP(thasattrRPtitemsRthandle(R	t	operationtsrctdstRSR<RU((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_call_user_data_handlers"cCs\d|_|_|jrFx|jD]}|jq#Wt|_nd|_d|_dS(N(RR(RDRR=tNodeListR2R1(R	RB((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR=s		N(t__name__t
__module__RtnamespaceURIR(RDR1R2RtprefixR
RRRRRRR"R*R9R)R@RFRKRLRNRORTRXR_R=(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR!s6						 		 							
			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<||jd<n|j|||jd<dS(NiR2R1R((Rt__dict__R>(R	R6Rtlast((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR7s	


cCs6x/|dk	r1|jtjkr%tS|j}qWtS(N(RRRRRR(R(R6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_in_documents

cCsP|rL|jddjddjddjdd}|j|nd	S(
sWrites datachars to writer.t&s&amp;t<s&lt;s"s&quot;t>s&gt;N(treplacetwrite(RR<((s+/usr/local/lib/python2.7/xml/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(tparenttnametrcR6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs,scCsx|jD]t}|jtjkr
|dks=|j|krh|dksX|j|krh|j|nt||||q
q
W|S(NR(RRRR?RhRcR>t"_get_elements_by_tagName_ns_helper(RttnsURIRhRvR6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRw4stDocumentFragmentcBsbeZejZdZdZdZdZ	ej
ejejej
ejejejfZdZRS(s#document-fragmentcCst|_dS(N(R`R(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt__init__KsN(RaRbRR RtnodeNameRt	nodeValuet
attributesR(R?R;tCDATA_SECTION_NODEtENTITY_REFERENCE_NODEtPROCESSING_INSTRUCTION_NODEtCOMMENT_NODEt
NOTATION_NODER#Rz(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRy=s	tAttrcBseZejZd	Zd	ZeZ	eZ
ejejfZ
ed	d	dZdZdZdZdZdZdZdZdZRS(
cCsS|j}||d<|d<||d<||d<t|d<|jjtdS(NR{RuRcRdR(RiR`RR>tText(R	tqNameRcRhRdRW((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRzXs	


cCs|jjdddS(Nt:ii(R{tsplit(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRLfscCs|jS(N(t	specified(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_specifiediscCs|j}|dkrk||d<|d<|jdj}||d<|d<|jdk	rt|jqnJ|dkr||d<|d<|jdk	rt|jqn
|||<dS(	NtvalueR|iR<RuR{(RR|(RuR{(RiRtownerElementRR/(R	RuRRWtd2((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt__setattr__ls	cCs|j}|dkr?|r?|tkr?tjjdq?n|j}||d<|dkrj|j}nd||jf}|jrt	|jn||d<|d<dS(Ntxmlnss5illegal use of 'xmlns' prefix for the wrong namespaceRds%s:%sR{Ru(
RcRR$R%tNamespaceErrRiRRhRR/(R	RdtnsuriRWtnewName((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_set_prefix{s			
	cCsH|j}||d<|d<|jr4t|jn||jd_dS(NRR|i(RiRR/RR<(R	RRW((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt
_set_values
		cCs|j}|dk	rq|j|j=|j|j|jf=|jrqt|_|j	d8_	|j
jd8_qqnx|jD]}|j
q{W|j2dS(Ni(RRt_attrsR{t_attrsNSRcRht_is_idRt_magic_id_nodesRDt_magic_id_countRR=(R	telemRB((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR=s	
		cCs|jr
tS|j}|j}|dks7|dkr;tS|j|}|dkrZtS|jry|j|j|j	S|j
|jSdS(N(RRRDRRRt_get_elem_infoRctisIdNSRhtisIdR{(R	RfRtinfo((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt	_get_isIds				cCs|j}|j}|dks*|dkr.tS|j|}|dkrMtS|jrl|j|j|jS|j|j	SdS(N(
RDRRt_no_typeRRctgetAttributeTypeNSRhtgetAttributeTypeR{(R	RfRR((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_schemaTypes			N(RaRbRtATTRIBUTE_NODERRR}RRRRR;RR#RRzRLRRRRR=RR(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyROs 	
							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
dZdZdd
ZeZdZdZdZdZdZdZdZdZdZdZdZdZdZRS(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((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRzs		cCs
t|jS(N(tlenR(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_lengthscCs2y||jj|SWntk
r-dSXdS(N(Rtkeyst
IndexErrorR(R	R+((s+/usr/local/lib/python2.7/xml/dom/minidom.pytitems
cCs=g}x0|jjD]}|j|j|jfqW|S(N(RtvaluesR>R{R(R	RAR6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRZscCsFg}x9|jjD](}|j|j|jf|jfqW|S(N(RRR>RcRhR(R	RAR6((s+/usr/local/lib/python2.7/xml/dom/minidom.pytitemsNSs&cCs-t|tr||jkS||jkSdS(N(t
isinstancetStringTypesRR(R	RS((s+/usr/local/lib/python2.7/xml/dom/minidom.pythas_keys
cCs
|jjS(N(RR(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCs
|jjS(N(RR(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pytkeysNSscCs
|jjS(N(RR(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCs|jj||S(N(Rtget(R	RuR((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCs<|jt|ddkrdStt|t|SdS(NRi(RtgetattrRtcmptid(R	RM((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt__cmp__scCs)t|tr|j|S|j|SdS(N(RR!RR(R	tattname_or_tuple((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt__getitem__scCst|trhy|j|}Wn9tk
r[t|}|jj|_|j|nX||_n.t|tst	dn|}|j|dS(Ns%value must be a string or Attr object(
RRRRRRRRDtsetNamedItemRt	TypeError(R	tattnameRR6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt__setitem__
s
cCs(y|j|SWntk
r#dSXdS(N(RRRR(R	Ru((s+/usr/local/lib/python2.7/xml/dom/minidom.pytgetNamedItems
cCs.y|j||fSWntk
r)dSXdS(N(RRRR(R	RcRh((s+/usr/local/lib/python2.7/xml/dom/minidom.pytgetNamedItemNS"s
cCs|j|}|dk	rnt|j|j|j=|j|j|jf=d|j	krjd|j	d<n|St
jjdS(NR(
RRR/RRR{RRcRhRiR$R%R-(R	Rutn((s+/usr/local/lib/python2.7/xml/dom/minidom.pytremoveNamedItem(s

cCs|j||}|dk	rqt|j|j|j|jf=|j|j=d|j	krmd|j	d<n|St
jjdS(NR(
RRR/RRRcRhRR{RiR$R%R-(R	RcRhR((s+/usr/local/lib/python2.7/xml/dom/minidom.pytremoveNamedItemNS4s

cCst|ts:tjjdt|t|fn|jj|j}|rb|j	n||j|j<||j
|j|jf<|j
|_t|j|S(Ns%s cannot be child of %s(RRR$R%R&R'RRRuR=RRcRhRRR/(R	R6RV((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR@s	"

cCs
|j|S(N(R(R	R6((s+/usr/local/lib/python2.7/xml/dom/minidom.pytsetNamedItemNSMscCs%||}t|j|jdS(N(R/RR=(R	RR6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt__delitem__Ps

cCs|j|j|jfS(N(RRR(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt__getstate__UscCs|\|_|_|_dS(N(RRR(R	tstate((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt__setstate__Xs(RRRN(RaRbt__doc__t	__slots__RzRRRZRRRRRRRt__len__t__hash__RRRRRRRRRRRR(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs4																	
			tlengths$Number of nodes in the NamedNodeMap.tTypeInfocBs2eZdZdZdZdZdZRS(t	namespaceRucCs||_||_dS(N(RRu(R	RRu((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRzds	cCs,|jrd|j|jfSd|jSdS(Ns<TypeInfo %r (from %r)>s
<TypeInfo %r>(RRu(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt__repr__hs	cCs|jS(N(Ru(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt	_get_namenscCs|jS(N(R(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_namespaceqs(RRu(RaRbRRzRRR(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRas
			tElementcBsLeZejZdZeZdZ	ejej
ejejej
ejfZedddZdZdZdZdZdZdZdZd	Zd
ZdZeZdZd
ZdZeZ dZ!dZ"dZ#dZ$dZ%ddddZ&dZ'dZ(dZ)dZ*dZ+RS(icCsD||_|_||_||_t|_i|_i|_dS(N(RrR{RdRcR`RRR(R	RrRcRdRh((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRzs			cCs|jjdddS(NRii(RrR(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRLscCs|jS(N(Rr(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_tagNamescCsGx!|jjD]}|jqWd|_d|_tj|dS(N(RRR=RRR(R	tattr((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR=s
		cCs+y|j|jSWntk
r&dSXdS(NR(RRRR(R	R((s+/usr/local/lib/python2.7/xml/dom/minidom.pytgetAttributes
cCs1y|j||fjSWntk
r,dSXdS(NR(RRRR(R	RcRh((s+/usr/local/lib/python2.7/xml/dom/minidom.pytgetAttributeNSs
cCs|j|}|dkr_t|}|j}||d<|d<|j|d<|j|nC||jkr|j}||d<|d<|jrt|qndS(NRR|RD(	tgetAttributeNodeRRRiRDtsetAttributeNodeRRR/(R	RRRRW((s+/usr/local/lib/python2.7/xml/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<||d<ndS(NRdR{RR|RD(t_nssplittgetAttributeNodeNSRRRiRDRRRR/Rd(R	Rct
qualifiedNameRRdt	localnameRRW((s+/usr/local/lib/python2.7/xml/dom/minidom.pytsetAttributeNSs$	


		
cCs|jj|S(N(RR(R	tattrname((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCs|jj||fS(N(RR(R	RcRh((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCs|jd|fkr*tjjdn|jj|jd}|dk	r^|j|n|j	j|j
|jfd}|dk	r||k	r|j|nt||||k	r|S||k	r|SdS(Nsattribute node already owned(
RRR$R%tInuseAttributeErrRRRutremoveAttributeNodeRRcRht_set_attribute_node(R	Rtold1told2((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs!
cCsEy|j|}Wn tk
r3tjjnX|j|dS(N(RRRR$R%R-R(R	RuR((s+/usr/local/lib/python2.7/xml/dom/minidom.pytremoveAttributes

cCsKy|j||f}Wn tk
r9tjjnX|j|dS(N(RRRR$R%R-R(R	RcRhR((s+/usr/local/lib/python2.7/xml/dom/minidom.pytremoveAttributeNSs

cCsw|dkrtjjny|j|jWn tk
rRtjjnXt||j|j	|_	dS(N(
RR$R%R-RRuRRR/R=RD(R	R6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs


cCs
||jkS(N(R(R	Ru((s+/usr/local/lib/python2.7/xml/dom/minidom.pythasAttributescCs||f|jkS(N(R(R	RcRh((s+/usr/local/lib/python2.7/xml/dom/minidom.pythasAttributeNSscCst||tS(N(RsR`(R	Ru((s+/usr/local/lib/python2.7/xml/dom/minidom.pytgetElementsByTagNamescCst|||tS(N(RwR`(R	RcRh((s+/usr/local/lib/python2.7/xml/dom/minidom.pytgetElementsByTagNameNSscCsd|jt|fS(Ns<DOM Element: %s at %#x>(RrR(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRsRc	Cs[|j|d|j|j}|j}|jx@|D]8}|jd|t|||j|jdqAW|jrF|jdt|jdkr|jdj	t
jkr|jdj|dddnH|j|x+|jD] }|j|||||qW|j||jd|j|fn|jd	|dS(
NRms %s="s"RniiRs</%s>%ss/>%s(
RpRrt_get_attributesRtsortRqRRRRRR;R(	R	RRt	addindentRRta_namesta_nameR6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs&

	
 

cCst|j|j|S(N(RRR(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR4scCs|jr
tStSdS(N(RRR(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt
hasAttributes7s	cCs |j|}|j|dS(N(RtsetIdAttributeNode(R	RutidAttr((s+/usr/local/lib/python2.7/xml/dom/minidom.pytsetIdAttribute?scCs#|j||}|j|dS(N(RR(R	RcRhR((s+/usr/local/lib/python2.7/xml/dom/minidom.pytsetIdAttributeNSCscCs|dks|j|jr1tjjnt|dk	rUtjjn|jst	|j
d<|jd7_|jj
d7_
t|ndS(NRi(RRNRR$R%R-t_get_containing_entreftNoModificationAllowedErrRRRiRRDRR/(R	R((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRGs	
N(,RaRbRR?RRR|RRRRRR;R~RR#RRzRLRR=RRRRRRRtsetAttributeNodeNSRRRtremoveAttributeNodeNSRRRRRRRRRRR(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRvsL														
									R}s*NamedNodeMap of attributes on the element.s%Namespace-local name of this element.cCsDt|||j|j<||j|j|jf<||jd<dS(NR(R/RRuRRcRhRi(telementR((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRXs
t	ChildlesscBsqeZdZd	ZeZd	Zd	ZdZ	dZ
dZdZdZ
dZdZdZRS(
sMixin that makes childless-ness easy to implement and avoids
    the complexity of the Node methods that deal with children.
    cCsdS(N(R(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRmscCsdS(N(R(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRpscCstjj|jddS(Ns nodes cannot have children(R$R%R&R{(R	R6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR*ss	cCstS(N(R(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRwscCstjj|jddS(Ns nodes do not have children(R$R%R&R{(R	R3R4((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR"zs	cCstjj|jddS(Ns nodes do not have children(R$R%R-R{(R	R8((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR)~s	cCsdS(N((R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR@scCstjj|jddS(Ns nodes do not have children(R$R%R&R{(R	R3R8((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR9s	N(RaRbRRR}t
EmptyNodeListRReRgRRR*RR"R)R@R9(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRcs								tProcessingInstructioncBsYeZejZdZdZdZdZdZ	dZ
ddddZRS(cCs$||_|_||_|_dS(N(ttargetR{R<R|(R	RR<((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRzscCs|jS(N(R<(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt	_get_datascCs|j}||d<|d<dS(NR<R|(Ri(R	RRW((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt	_set_datas	cCs|jS(N(R(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_targetscCs|j}||d<|d<dS(NRR{(Ri(R	RRW((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_set_targets	cCsw|dks|dkr3||jd<|jd<n@|dksK|dkrf||jd<|jd<n
||j|<dS(NR<R|RR{(Ri(R	RuR((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs
RcCs'|jd||j|j|fdS(Ns
%s<?%s %s?>%s(RpRR<(R	RRRR((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs(RaRbRRRRzRRRRRR(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs							t
CharacterDatacBsteZdZeZdZdZeZeZdZdZ	dZ
dZdZdZ
d	ZRS(
cCs
t|jS(N(RR<(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCs|jdS(NR<(Ri(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCs|j}||d<|d<dS(NR<R|(Ri(R	R<RW((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs	cCsD|dks|dkr3||jd<|jd<n
||j|<dS(NR<R|(Ri(R	RuR((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCsH|j}t|dkr$d}nd}d|jj|dd!|fS(Ni
s...Rs<DOM %s node "%r%s">i(R<Rt	__class__Ra(R	R<t	dotdotdot((s+/usr/local/lib/python2.7/xml/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((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt
substringDatascCs|j||_dS(N(R<(R	targ((s+/usr/local/lib/python2.7/xml/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
((s+/usr/local/lib/python2.7/xml/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((s+/usr/local/lib/python2.7/xml/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
((s+/usr/local/lib/python2.7/xml/dom/minidom.pytreplaceDatas(RaRbRRRRt_get_nodeValuet_set_nodeValueRRR	RRR
R(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs												
sLength of the string data.RcBsSeZejZdZdZdZddddZ	dZ
dZdZ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%RRRDR1R(RRR*R"(R	RtnewTexttnext((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt	splitTexts!	RcCs!t|d||j|fdS(Ns%s%s%s(RqR<(R	RRRR((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR
scCs|jg}|j}xK|dk	rb|jtjtjfkr^|jd|j|j}qPqW|j}xH|dk	r|jtjtjfkr|j	|j|j}qoPqoWdj
|S(NiR(R<R2RRRR;R~R0R1R>tjoin(R	RAR((s+/usr/local/lib/python2.7/xml/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(R2RRRR;R~R)R1Ri(R	tcontentRtRRRW((s+/usr/local/lib/python2.7/xml/dom/minidom.pytreplaceWholeText$s.			
			
		

cCs_|jjrtSt|}|dkr/tS|jj|}|dkrQtS|jSdS(N(R<tstripRt_get_containing_elementRRDRtisElementContent(R	RR((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt!_get_isWhitespaceInElementContentBsN(
RaRbRR;RR{RR}RRRRR(((s+/usr/local/lib/python2.7/xml/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?(R6R5((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRUs	
cCs?|j}x/|dk	r:|jtjkr.|S|j}qWdS(N(R(RRRR(R6R5((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR]s	
tCommentcBs2eZejZdZdZddddZRS(s#commentcCs||_|_dS(N(R<R|(R	R<((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRzjsRcCs?d|jkrtdn|jd||j|fdS(Ns--s%'--' is not allowed in a comment nodes
%s<!--%s-->%s(R<R,Rp(R	RRRR((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRms(RaRbRRRR{RzR(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRfs		tCDATASectioncBs)eZejZdZddddZRS(s#cdata-sectionRcCs?|jjddkr'tdn|jd|jdS(Ns]]>is$']]>' not allowed in a CDATA sections<![CDATA[%s]]>(R<tfindR,Rp(R	RRRR((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR|s(RaRbRR~RR{R(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRss	tReadOnlySequentialNamedNodeMapcBseZdZddZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZRS(t_seqcCs
||_dS(N(R"(R	tseq((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRzscCs
t|jS(N(RR"(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCs
t|jS(N(RR"(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCs+x$|jD]}|j|kr
|Sq
WdS(N(R"R{(R	RuR((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCs:x3|jD](}|j|kr
|j|kr
|Sq
WdS(N(R"RcRh(R	RcRhR((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCsLt|tr!|j|}n|j|}|dkrHt|n|S(N(RR!RRRRR(R	t
name_or_tupleR6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCs8|dkrdSy|j|SWntk
r3dSXdS(Ni(RR"R(R	R+((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs
cCstjjddS(Ns"NamedNodeMap instance is read-only(R$R%R(R	Ru((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs	cCstjjddS(Ns"NamedNodeMap instance is read-only(R$R%R(R	RcRh((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs	cCstjjddS(Ns"NamedNodeMap instance is read-only(R$R%R(R	R6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs	cCstjjddS(Ns"NamedNodeMap instance is read-only(R$R%R(R	R6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs	cCs
|jgS(N(R"(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCs|d|_dS(Ni(R"(R	R((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs(R"((RaRbRRzRRRRRRRRRRRR(((s+/usr/local/lib/python2.7/xml/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'((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_identified_mixin_inits	cCs|jS(N(R&(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt
_get_publicIdscCs|jS(N(R'(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt
_get_systemIds(RaRbRR(R)R*(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR%s		tDocumentTypecBs\eZejZdZdZdZdZ	dZ
dZdZdZ
ddddZRS(cCsLt|_t|_|r<t|\}}||_n|j|_dS(N(R!tentitiest	notationsRRuR{(R	RRdR((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRzscCs|jS(N(tinternalSubset(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_internalSubsetscCs\|jdkrTtd}|j|_|j|_tjjj}|r=g|j	_
g|j_
xU|jj
D]G}t|j|j
|j}|jj
j||j|||qmWx|j	j
D]q}t|j|j
|j|j}|j|_|j|_|j|_|j	j
j||j|||qWn|j||||SdSdS(N(RDRR+RuR{R$R%tUserDataHandlertNODE_CLONEDR,R"R-tNotationR&R'R>R_tEntitytnotationNametactualEncodingR
RJ(R	REtcloneR\Rtnotationtetentity((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRFs.RcCs|jd|j|j|jrL|jd||j||jfn&|jrr|jd||jfn|jdk	r|jd|j|j|jdn|jd|dS(Ns
<!DOCTYPE s%s  PUBLIC '%s'%s  '%s's%s  SYSTEM '%s's [t]Rn(RpRuR&R'R.R(R	RRRR((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs
			
N(RaRbRtDOCUMENT_TYPE_NODERRR|RuR&R'R.RzR/RFR(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR+s				R3cBsweZdZejZdZdZdZ	dZ
dZdZdZ
dZdZdZdZdZRS(	cCs2||_||_t|_|j||dS(N(R{R4R`RR((R	RuR&R'R7((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRzs		cCs|jS(N(R5(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_actualEncodingscCs|jS(N(R
(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt
_get_encoding"scCs|jS(N(RJ(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_version%scCstjjddS(Ns(cannot append children to an entity node(R$R%R&(R	R3((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR*(s	cCstjjddS(Ns+cannot insert children below an entity node(R$R%R&(R	R3R4((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR",s	cCstjjddS(Ns*cannot remove children from an entity node(R$R%R&(R	R8((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR)0s	cCstjjddS(Ns)cannot replace children of an entity node(R$R%R&(R	R3R8((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR94s	N(RaRbRR}RtENTITY_NODERR|R5R
RJRzR<R=R>R*R"R)R9(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR3s								R2cBs eZejZdZdZRS(cCs||_|j||dS(N(R{R((R	RuR&R'((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRz<s	N(RaRbRRRRR|Rz(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR28s	tDOMImplementationc	BsSeZddddddddgZdZdZdZd	Zd
ZRS(tcores1.0s2.0R$sls-loads3.0cCs.|dkrd}n|j|f|jkS(NR(Rtlowert	_features(R	RIRJ((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRHLs	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*RDtdoctypeRG(	R	RcRRHRftadd_root_elementRdRR((s+/usr/local/lib/python2.7/xml/dom/minidom.pytcreateDocumentQs4	



			cCs"t|}||_||_|S(N(R+R&R'(R	RR&R'RH((s+/usr/local/lib/python2.7/xml/dom/minidom.pytcreateDocumentType~s		cCs|j|dr|SdSdS(N(RHR(R	RI((s+/usr/local/lib/python2.7/xml/dom/minidom.pyROscCstS(N(tDocument(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyREs(RAs1.0(RAs2.0N(RAN(R$s1.0(R$s2.0(R$N(sls-loads3.0(sls-loadN(	RaRbRRCRHRJRKRORE(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR@As			-		tElementInfocBseeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZRS(sObject that represents content-model information for an element.

    This implementation is not expected to be used in practice; DOM
    builders should provide implementations which do the right thing
    using information available to it.

    RrcCs
||_dS(N(Rr(R	Ru((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRzscCstS(N(R(R	taname((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCstS(N(R(R	RcRh((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCstS(N(R(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCstS(sQReturns true iff this element is declared to have an EMPTY
        content model.(R(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pytisEmptyscCstS(s7Returns true iff the named attribute is a DTD-style ID.(R(R	RN((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCstS(s<Returns true iff the identified attribute is a DTD-style ID.(R(R	RcRh((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCs|jS(N(Rr(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCs
||_dS(N(Rr(R	R((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs(Rr(
RaRbRRRzRRRRORRRR(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRMs								cCsZ|jtjkr+|jjd|_n+t|rV|jjjd|j_ndS(N(	RRRt	_id_cachetclearRt_id_search_stackRkRD(R6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR/s
RLcBseZejejejejfZejZ	dZ
d$Zd$Z
d$Zd$Zd$ZZeZd$Zd$Zd$Zd$ZeZd$Zd$ZdZdZdZdZdZ dZ!dZ"dZ#d	Z$d
Z%dZ&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(R`Rt
_elem_infoRPRRR(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRzs		cCs7|jr|j|jf}n	|j}|jj|S(N(RcRhRrRSR(R	RRS((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs		cCs|jS(N(R5(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR<scCs|jS(N(RH(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_doctypescCs|jS(N(tdocumentURI(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_documentURIscCs|jS(N(R
(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR=scCs|jS(N(terrorHandler(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_errorHandlerscCs|jS(N(t
standalone(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_standalonescCs|jS(N(tstrictErrorChecking(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_get_strictErrorCheckingscCs|jS(N(RJ(R	((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR>scCs|j|jkr=tjjdt|t|fn|jdk	r_|jj|n|jt	j
kr|jrtjjdnt	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	R6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR*s	"	cCsoy|jj|Wn tk
r6tjjnXd|_|_d|_	|j
|krkd|_
n|S(N(RR:R,R$R%R-RR1R2R(tdocumentElement(R	R8((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR)s
	cCs.x'|jD]}|jtjkr
|Sq
WdS(N(RRRR?(R	R6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyR]scCs9|jdk	r(|jjd|_ntj|dS(N(RHRR=R(R	((s+/usr/local/lib/python2.7/xml/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(RRGRJR
RYRJRRCRDRNtAssertionErrorR>RRRR^R;RHR(R_R$R%R0R1(R	RER6Rt
childclone((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRF*s&

cCst}||_|S(N(RyRD(R	RW((s+/usr/local/lib/python2.7/xml/dom/minidom.pytcreateDocumentFragment?s		cCst|}||_|S(N(RRD(R	RrR8((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt
createElementDs	cCs:t|tstdnt}||_||_|S(Nsnode contents must be a string(RRRRR<RD(R	R<tt((s+/usr/local/lib/python2.7/xml/dom/minidom.pytcreateTextNodeIs			cCs:t|tstdnt}||_||_|S(Nsnode contents must be a string(RRRRR<RD(R	R<R5((s+/usr/local/lib/python2.7/xml/dom/minidom.pytcreateCDATASectionQs			cCst|}||_|S(N(RRD(R	R<R5((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt
createCommentYs	cCst||}||_|S(N(RRD(R	RR<tp((s+/usr/local/lib/python2.7/xml/dom/minidom.pytcreateProcessingInstruction^s	cCs"t|}||_d|_|S(NR(RRDR(R	Rta((s+/usr/local/lib/python2.7/xml/dom/minidom.pytcreateAttributecs		cCs1t|\}}t|||}||_|S(N(RRRD(R	RcRRdRhR8((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRGis	cCs=t|\}}t||||}||_d|_|S(NR(RRRDR(R	RcRRdRhRi((s+/usr/local/lib/python2.7/xml/dom/minidom.pytcreateAttributeNSos
		cCs"t||||}||_|S(N(R3RD(R	RuR&R'R4R8((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_create_entityys	cCst|||}||_|S(N(R2RD(R	RuR&R'R((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_create_notation~s	cCsE||jkr|j|S|jp)|js0dS|j}|dkr]|jg}||_n
|sgdSd}x|r@|j}|jg|jD]}|j	t
kr|^q|j|}|rxa|jj
D]}|jr;|j|j|jr||j|j<|j|kr(|}q8|js8Pq8qq|j|jr||j|j<|j|kru|}q|jsPqq|jr||j|j<|j|kr|}q|jdkrPqqqWnZ|jr-xN|jj
D]:}|jr||j|j<|j|kr&|}q&qqWn|dk	rpPqpqpW|S(Ni(RPRSRRRRR^tpoptextendRRR.RR}RRcRRhRRRRuR(R	RtstacktresultR6RBRR((s+/usr/local/lib/python2.7/xml/dom/minidom.pytgetElementByIds\					
						cCst||tS(N(RsR`(R	Ru((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCst|||tS(N(RwR`(R	RcRh((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRscCs|jj||S(N(RGRH(R	RIRJ((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRKscCs^|jtjkr'tjjdn'|jtjkrNtjjdnt|||S(Nscannot import document nodess!cannot import document type nodes(RRRR$R%tNotSupportedErrR;RC(R	R6RE((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt
importNodes
RcCse|dkr |jd|n|jd||fx'|jD]}|j||||qAWdS(Ns<?xml version="1.0" ?>s%<?xml version="1.0" encoding="%s"?>%s(RRpRR(R	RRRRR
R6((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs
c	Cs|j|k	r1tjjd||jfn|jtjtjfkratjjdn|t	krd|kr|j
dd\}}|dkr|tjjkrtjjdqq'|dkr|tjjkr|jtjkrtjjdnd}|}nd}d}|jtjkrj|j}|dk	rp|j}|j|qpnd}|j}||d<||d	<||d
<||d<|jtjkr||d<n<||d
<|dk	r|j||r|j|qn|S(Ns?cannot rename nodes from other documents;
expected %s,
found %ss8renameNode() only applies to element and attribute nodesRiRsillegal use of 'xmlns' prefixs$illegal use of the 'xmlns' attributeRdRhRcR{RrRu(RDR$R%RDRRR?RRsRRRRRRRRRiRR(	R	RRcRuRdRhRtis_idRW((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt
renameNodesT								






N(>RaRbRR?RRR;R#RRR{RR|R}RHR(R2R1R@RGR5R
RYRJRR[RWRURRzRR<RTRVR=RXRZR\R>R*R)R]R=RFRaRbRdReRfRhRjRGRkRlRmRrRRRKRtRRv(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRLsh	
																									
			:					
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
    R_sCannot clone node %s(;RDRNR$R%R0R1t
NODE_IMPORTEDRRR?RGRcR{R}RRRRRhRRRCR*R RaR;RdR<R~ReRRhRRRfRRkRR;R_RGRKRuR&R'R,R"R-R2R>RYR_R3R4R5R
RJRsR'(
R6REtnewOwnerDocumentR\R6RRiRBR5RR7R8R9((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRCs~					 cCs:|jdd}t|dkr(|Sd|dfSdS(NRiii(RRR(Rtfields((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRfscCsddlm}|S(Ni(tStringIO(Rz(Rz((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRnscCs<|||}|j\}}|j||j|S(N(tgetEventt
expandNodeRQ(tfunctargstkwargsteventsttoktypetrootNode((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt_do_pulldom_parsess


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((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRzs
cCsZ|dkr)ddlm}|j|Sddlm}t|j|fi|d6SdS(s&Parse a file into a DOM from a string.i(R(RRN(RRRtparseStringRR(tstringRRR((s+/usr/local/lib/python2.7/xml/dom/minidom.pyRs
cCsa|rZt|tr'tj|}nx0|D]%\}}tjj||s.dSq.WntjS(N(RRRt_parse_feature_stringRLRGRHR(tfeaturestftv((s+/usr/local/lib/python2.7/xml/dom/minidom.pytgetDOMImplementations(8RRR$RRRRtxml.dom.minicompattxml.dom.xmlbuilderRRR%RR?RR.tdefpropertyR7RkRqRsRwRyRtobjectRt
AttributeListRRRRRRRRRRRRRR!R%R+R3R2R@RMR/RLRCRRRRRR(((s+/usr/local/lib/python2.7/xml/dom/minidom.pyt<module>s"
	
					r	(GZ			
><(	O*	O	R			


Zerion Mini Shell 1.0