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, 06 Nov 2009

view this page in

DomElement->tagname

(PHP 4 >= 4.1.0)

DomElement->tagname 現在の要素名を返す

説明

string tagname ( void )

現在のノードの名前を返します。この関数をコールすることは、 tagname プロパティにアクセスする、 もしくは現在のノードに対して DomNode->node_name をコールすることと等価です。

返り値

現在の DomElement ノードの名前を返します。

例1 ノード名を取得する

<?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


?>

PHP 5 への移行

DOMElement オブジェクトの tagName プロパティを使用してください。



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, 06 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites