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_name
(No version information available, might be only in CVS)
DomNode->node_name — Devuelve el nombre del nodo
Descripción
string DomNode->node_name
( void
)
Devuelve el nombre del nodo. El nombre tiene significados diferentes para los diferentes tipos de nodo, como se ilustra en la siguiente tabla.
| Tipo | Significado |
|---|---|
| DomAttribute | valor del atributo |
| DomAttribute | |
| DomCDataSection | sección-#cdata |
| DomComment | #comment |
| DomDocument | #document |
| DomDocumentType | nombre del tipo de documento |
| DomElement | nombre de la etiqueta |
| DomEntity | nombre de la entidad |
| DomEntityReference | nombre de referencia a entidad |
| DomNotation | nombre de notación |
| DomProcessingInstruction | destino |
| DomText | #text |
DomNode->node_name
zombie)(at)(localm)(dot)(.org
30-Dec-2002 07:33
30-Dec-2002 07:33
