<?php
/* Remove all attribute from a node */
foreach ($node->attributes() as $attr)
$node->remove_attribute($attr);
/* Then rename that tag */
$node->set_name('div');
/* And set appropriate "class" attribute */
$node->set_attribute('class','paragraphBox');
?>
DomElement->remove_attribute
(No version information available, might be only in CVS)
DomElement->remove_attribute — Supprime un attribut
Description
bool remove_attribute
( string $name
)
Supprime un attribut du noeud courant DomElement.
Liste de paramètres
- name
-
Le nom de l'attribut à supprimer.
Valeurs de retour
Cette fonction retourne TRUE en cas de succès, FALSE en cas d'échec.
Migration vers PHP 5
Utilisez DOMElement::removeAttribute.
DomElement->remove_attribute
fpiat / bigfoot com
18-Apr-2006 11:38
18-Apr-2006 11:38
