array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'domelement.setattributens.php', 1 => 'DOMElement::setAttributeNS', ), 'up' => array ( 0 => 'class.domelement.php', 1 => 'DOMElement', ), 'prev' => array ( 0 => 'domelement.setattributenodens.php', 1 => 'DOMElement::setAttributeNodeNS', ), 'next' => array ( 0 => 'domelement.setidattribute.php', 1 => 'DOMElement::setIdAttribute', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'pt_BR', 'path' => 'reference/dom/domelement/setattributens.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5, PHP 7, PHP 8)
DOMElement::setAttributeNS — Adiciona um novo atributo
Define um atributo com namespace namespace
e
nome qualifiedName
para o valor fornecido. Se o atributo
não existir, ele será criado.
namespace
O URI do namespace.
qualifiedName
O nome qualificado do atributo, comoprefix:tagname
.
value
O valor do atributo.
Nenhum valor é retornado.
DOM_NO_MODIFICATION_ALLOWED_ERR
Gerado se o nó for somente leitura.
DOM_NAMESPACE_ERR
Gerado se qualifiedName
for um nome qualificado mal formado,
ou se qualifiedName
tiver um prefixo e
namespace
for null
.