PHP: DomNode->node_name - Manual

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

search for in the

DomNode->node_type DomNode->next_sibling

Last updated: Fri, 26 Jan 2007

view this page in

# DomNode->node_name

(no version information, might be only in CVS)

DomNode->node_name -- Returns name of node

## Описание

string DomNode->node_name ( void )

Returns name of the node. The name has different meanings for the different types of nodes as illustrated in the following table.

Таблица 1. Meaning of value

Type | Meaning
--- | ---
DomAttribute | value of attribute
DomAttribute |
DomCDataSection | #cdata-section
DomComment | #comment
DomDocument | #document
DomDocumentType | document type name
DomElement | tag name
DomEntity | name of entity
DomEntityReference | name of entity reference
DomNotation | notation name
DomProcessingInstruction | target
DomText | #text

add a note User Contributed Notes
DomNode->node_name
zombie)(at)(localm)(dot)(.org
30-Dec-2002 10: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`
add a note
DomNode->node_type DomNode->next_sibling

Last updated: Fri, 26 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 09:32:46 2007 PST