downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

DomNode->add_namespace> <DomElement->set_attribute
Last updated: Fri, 14 Aug 2009

view this page in

DomElement->tagname

(PHP 4 >= 4.1.0)

DomElement->tagname Retourne le nom de l'élément courant

Description

string tagname ( void )

Retourne le nom du noeud courant. Appeler cette fonction revient à accéder à la propriété tagname ou appeler DomNode->node_name sur le noeud courant.

Valeurs de retour

Retourne le nom du noeud courant DomElement.

Exemples

Exemple #1 Récupération du nom du noeud

<?php

include("example.inc");

if (!
$dom domxml_open_mem($xmlstr)) {
    echo 
"Erreur lors de l'analyse du document\n";
    exit;
}

$root $dom->document_element();
echo 
$root->tagname();   // chapitre
echo $root->tagname;     // chapitre
echo $root->node_name(); // chapitre

?>

Migration vers PHP 5

Utilisez la propriété tagName de l'objet DOMElement.



add a note add a note User Contributed Notes
DomElement->tagname
There are no user contributed notes for this page.

DomNode->add_namespace> <DomElement->set_attribute
Last updated: Fri, 14 Aug 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites