Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<DOMElement::removeAttributeNodeDOMElement::replaceChildren>
^DOMElementLast updated: Mon, 26 Oct 2026

DOMElement::removeAttributeNS

(PHP 5, PHP 7, PHP 8)

DOMElement::removeAttributeNS — Removes attribute

Description

public function DOMElement::removeAttributeNS(?string $namespace, string $localName): void

Removes attribute localName in namespace namespace from the element.

Parameters

namespace

The namespace URI.

localName

The local name.

Return Values

No value is returned.

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::removeAttributeNodeDOMElement::replaceChildren>
^DOMElementLast updated: Mon, 26 Oct 2026