MCPcopy Index your code
hub / github.com/python/cpython / setAttributeNS

Method setAttributeNS

Lib/xml/dom/minidom.py:770–785  ·  view source on GitHub ↗
(self, namespaceURI, qualifiedName, value)

Source from the content-addressed store, hash-verified

768 _clear_id_cache(self)
769
770 def setAttributeNS(self, namespaceURI, qualifiedName, value):
771 prefix, localname = _nssplit(qualifiedName)
772 attr = self.getAttributeNodeNS(namespaceURI, localname)
773 if attr is None:
774 attr = Attr(qualifiedName, namespaceURI, localname, prefix)
775 attr.value = value
776 attr.ownerDocument = self.ownerDocument
777 self.setAttributeNode(attr)
778 else:
779 if value != attr.value:
780 attr.value = value
781 if attr.isId:
782 _clear_id_cache(self)
783 if attr.prefix != prefix:
784 attr.prefix = prefix
785 attr.nodeName = qualifiedName
786
787 def getAttributeNode(self, attrname):
788 if self._attrs is None:

Callers 12

lnFunction · 0.80
dnFunction · 0.80
iFunction · 0.80
EFunction · 0.80
CFunction · 0.80
neFunction · 0.80
EFunction · 0.80
CFunction · 0.80
nrFunction · 0.80
testRemoveAttrNSMethod · 0.80
testGetAttributeNSMethod · 0.80
_clone_nodeFunction · 0.80

Calls 5

getAttributeNodeNSMethod · 0.95
setAttributeNodeMethod · 0.95
_nssplitFunction · 0.85
AttrClass · 0.85
_clear_id_cacheFunction · 0.85

Tested by 2

testRemoveAttrNSMethod · 0.64
testGetAttributeNSMethod · 0.64