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

search for in the

DomNode->add_namespace> <DomElement->set_attribute()
Last updated: Fri, 20 Jun 2008

view this page in

DomElement->tagname()

(No version information available, might be only in CVS)

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

Description

DomElement
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, 20 Jun 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites