Add a new attibute node to the element, replacing an existing
attribute if necessary if the name attribute matches. If a
replacement occurs, the old attribute node will be returned. If
newAttr is already in use, InuseAttributeErr will be
raised.
Add a new attibute node to the element, replacing an existing
attribute if necessary if the namespaceURI and
localName attributes match. If a replacement occurs, the old
attribute node will be returned. If newAttr is already in use,
InuseAttributeErr will be raised.