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

search for in the

DomNode->node_type> <DomNode->next_sibling
Last updated: Fri, 06 Nov 2009

view this page in

DomNode->node_name

(PHP 4 >= 4.1.0)

DomNode->node_name ノード名を返す

説明

string DomNode->node_name ( void )

ノード名を返します。名前は以下の表の通り、 異なるノードの型に対しては異なる意味を持ちます。

値の意味
意味
DomAttribute 属性値
DomAttribute  
DomCDataSection #cdata セクション
DomComment #comment
DomDocument #document
DomDocumentType 文章型名
DomElement タグ名
DomEntity エンティティ名
DomEntityReference エンティティ参照名
DomNotation ノーテーション名
DomProcessingInstruction ターゲット
DomText #text



add a note add a note User Contributed Notes
DomNode->node_name
zombie)(at)(localm)(dot)(.org
30-Dec-2002 06:33
Loop through children making sure that the children are not text nodes.
<pre>

$moduleDoc = domxml_open_file("main_module_defs.xml");
$moduleDefinitionXPath = xpath_new_context($moduleDoc);
$dConvsNodeSet = xpath_eval($moduleDefinitionXPath, "//modules/module[@name='search']/dConvs");
$children = $dConvsNodeSet->nodeset[0]-> child_nodes();
$dTotal = count($children);
for ($i=0;$i<$dTotal;$i++){
    $curNode = $children[$i];
    if($curNode->node_name() != "#text"){
        echo "This are probably TextNodes...";    }
}
</pre>

--
http://artattack.to

DomNode->node_type> <DomNode->next_sibling
Last updated: Fri, 06 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites