DOMElement::setIdAttributeNS
(PHP 5, PHP 7, PHP 8)
Declares the attribute specified by local name and namespace URI to be of type ID
Description
Declares the attribute specified by qualifiedName and namespace to be of type ID.
Parameters
namespaceThe namespace URI of the attribute.
qualifiedNameThe local name of the attribute, as
prefix:tagname.isIdSet it to true if you want
nameto be of type ID, false otherwise.
Return Values
Void
Errors/Exceptions
May throw a DOMException with the following error codes:
DOM_NO_MODIFICATION_ALLOWED_ERRRaised if the node is readonly.
DOM_NOT_FOUND_ERRRaised if
nameis not an attribute of this element.
See Also
DOMDocument::getElementByIdDOMElement::setIdAttributeDOMElement::setIdAttributeNode