php8.5
Home/ Manual/ dom / domelement/ DOMElement::removeAttributeNS

DOMElement::removeAttributeNS

PHP function Edit on GitHub ✎

(PHP 5, PHP 7, PHP 8)

Removes attribute

Description

DOMElement::removeAttributeNS(string|null $namespace, string $localName): void

Removes attribute localName in namespace namespace from the element.

Parameters

namespace

The namespace URI.

localName

The local name.

Return Values

Void

Errors/Exceptions

May throw a DOMException with the following error codes:

DOM_NO_MODIFICATION_ALLOWED_ERR

Raised if the node is readonly.

See Also

  • DOMElement::hasAttributeNS
  • DOMElement::getAttributeNS
  • DOMElement::setAttributeNS

Source: reference/dom/domelement/removeattributens.xml · from the official PHP manual (php/doc-en)