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, 22 Aug 2008

view this page in

DomElement->tagname()

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

DomElement->tagname() Devuelve el nombre del elemento actual

Descripción

DomElement
string tagname ( void )

Devuelve el nombre del nodo actual. Llamar esta función es equivalente a acceder a la propiedad tagname, o llamar DomNode->node_name en el nodo actual.

Valores retornados

Devuelve el nombre del nodo DomElement actual.

Ejemplos

Example #1 Obtener el nombre del nodo

<?php

include("ejemplo.inc");

if (!
$dom domxml_open_mem($cadena_xml)) {
    echo 
"Ocurri&oacute; un error al interpretar el documento\n";
    exit;
}

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


?>

Migración a PHP 5

Use la propiedad tagName del objeto 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, 22 Aug 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites