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

search for in the

DomNode->node_name> <DomNode->last_child
Last updated: Fri, 04 Jul 2008

view this page in

DomNode->next_sibling

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

DomNode->next_sibling — Devuelve el siguiente hermano del nodo

Descripción

domelement DomNode->next_sibling ( void )

Esta función devuelve el siguiente hermano del nodo actual. Si no hay un siguiente hermano, devuelve FALSE (< 4.3) o null (>= 4.3). Es posible usar esta función para iterar sobre los hijos de un nodo, como se muestra en el ejemplo a continuación.

Example #1 Iterar sobre los hijos

<?php
include("ejemplo.inc");

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

$elementos $dom->get_elements_by_tagname("tbody");
$elemento $elementos[0];
$hijo $elemento->first_child();

while (
$hijo) {
   
print_r($hijo);
   
$hijo $hijo->next_sibling();
}
?>

Vea también domnode_previous_sibling().



add a note add a note User Contributed Notes
DomNode->next_sibling
There are no user contributed notes for this page.

DomNode->node_name> <DomNode->last_child
Last updated: Fri, 04 Jul 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites