@@ -153,6 +153,11 @@ Objects in the DOM
153153
154154The definitive documentation for the DOM is the DOM specification from the W3C.
155155
156+ The names documented in this section are DOM interfaces.
157+ With the exception of :class: `Node ` and the exception classes,
158+ they are not provided by the :mod: `!xml.dom ` module itself,
159+ but by concrete DOM implementations, such as :mod: `xml.dom.minidom `.
160+
156161Note that DOM attributes may also be manipulated as nodes instead of as simple
157162strings. It is fairly rare that you must do this, however, so this usage is not
158163yet documented.
@@ -461,23 +466,23 @@ for each node type are:
461466.. method :: Node.insertBefore(newChild, refChild)
462467
463468 Insert a new child node before an existing child. It must be the case that
464- *refChild * is a child of this node; if not, :exc: `ValueError ` is raised.
469+ *refChild * is a child of this node; if not, :exc: `NotFoundErr ` is raised.
465470 *newChild * is returned. If *refChild * is ``None ``, it inserts *newChild * at the
466471 end of the children's list.
467472
468473
469474.. method :: Node.removeChild(oldChild)
470475
471476 Remove a child node. *oldChild * must be a child of this node; if not,
472- :exc: `ValueError ` is raised. *oldChild * is returned on success. If *oldChild *
477+ :exc: `NotFoundErr ` is raised. *oldChild * is returned on success. If *oldChild *
473478 will not be used further, its :meth: `~xml.dom.minidom.Node.unlink ` method
474479 should be called.
475480
476481
477482.. method :: Node.replaceChild(newChild, oldChild)
478483
479484 Replace an existing node with a new node. It must be the case that *oldChild *
480- is a child of this node; if not, :exc: `ValueError ` is raised.
485+ is a child of this node; if not, :exc: `NotFoundErr ` is raised.
481486
482487
483488.. method :: Node.normalize()
@@ -826,8 +831,7 @@ of that class.
826831
827832.. method :: Element.removeAttribute(name)
828833
829- Remove an attribute by name. If there is no matching attribute, a
830- :exc: `NotFoundErr ` is raised.
834+ Remove an attribute by name.
831835
832836
833837.. method :: Element.removeAttributeNode(oldAttr)
@@ -838,8 +842,7 @@ of that class.
838842
839843.. method :: Element.removeAttributeNS(namespaceURI, localName)
840844
841- Remove an attribute by name. Note that it uses a localName, not a qname. No
842- exception is raised if there is no matching attribute.
845+ Remove an attribute by name. Note that it uses a localName, not a qname.
843846
844847
845848.. method :: Element.setAttribute(name, value)
0 commit comments