PHP 8.3.4 Released!

DOMElement::setAttributeNodeNS

(PHP 5, PHP 7, PHP 8)

DOMElement::setAttributeNodeNSAdiciona um novo nó de atributo ao elemento

Descrição

public DOMElement::setAttributeNodeNS(DOMAttr $attr): DOMAttr|null|false

Adiciona um novo nó de atributo attr ao elemento, levando em consideração o namespace. Se um atributo com o mesmo nome já existir no elemento, esse atributo será substituído por attr.

Parâmetros

attr

O nó de atributo.

Valor Retornado

Retorna o atributo antigo se tiver sido substituído ou null se não houver atributo antigo. Se ocorrer um erro de DOM_WRONG_DOCUMENT_ERR, e strictErrorChecking for false, false será retornado.

Erros/Exceções

DOM_WRONG_DOCUMENT_ERR

Gerado se attr pertencer a um documento diferente do elemento.

Veja Também

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top