array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'es', ), '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' => 'es', '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 — Añade un nuevo atributo
Establece un atributo con el espacio de nombres namespace
y
el nombre qualifiedName
al valor dado. Si el atributo
no existe, se creará.
namespace
La URI del espacio de nombres.
qualifiedName
El nombre cualificado del atributo, como prefijo:nombre_etiqueta
.
value
El valor del atributo.
No devuelve ningún valor.
DOM_NO_MODIFICATION_ALLOWED_ERR
Lanzado si el nodo es de sólo lectura.
DOM_NAMESPACE_ERR
Lanzado si qualifiedName
es un nombre cualificado
malformado, o si qualifiedName
tienen un prefijo y
namespace
es null
.