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

Method setIdAttributeNode

Lib/xml/dom/minidom.py:934–943  ·  view source on GitHub ↗
(self, idAttr)

Source from the content-addressed store, hash-verified

932 self.setIdAttributeNode(idAttr)
933
934 def setIdAttributeNode(self, idAttr):
935 if idAttr is None or not self.isSameNode(idAttr.ownerElement):
936 raise xml.dom.NotFoundErr()
937 if _get_containing_entref(self) is not None:
938 raise xml.dom.NoModificationAllowedErr()
939 if not idAttr._is_id:
940 idAttr._is_id = True
941 self._magic_id_nodes += 1
942 self.ownerDocument._magic_id_count += 1
943 _clear_id_cache(self)
944
945defproperty(Element, "attributes",
946 doc="NamedNodeMap of attributes on the element.")

Callers 4

setIdAttributeMethod · 0.95
setIdAttributeNSMethod · 0.95
renameNodeMethod · 0.80

Calls 3

_get_containing_entrefFunction · 0.85
_clear_id_cacheFunction · 0.85
isSameNodeMethod · 0.80

Tested by 1