DomElement->tagname

(no version information, might be only in CVS)

DomElement->tagname --  Restituisce il nome dell'elemento corrente

Descrizione

string DomElement->tagname ( void )

Returns the name of the current node. Chiamare questa funzione è come accedere alla proprietà tagname del nodo corrente, o chiamare DomElement->node_name().

Esempio 1. Ottenere il nome del nodo

<?php

include("example.inc");

if (!
$dom = domxml_open_mem($xmlstr)) {
    echo
"Error while parsing the document\n";
    exit;
}

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


?>