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_name> <DomNode::last_child
[edit] Last updated: Fri, 25 May 2012

view this page in

DomNode::next_sibling

(PHP 4 >= 4.1.0)

DomNode::next_sibling Devuelve el siguiente hermano del nodo

Descripción

domelement DomNode::next_sibling ( void )

Esta función retorna el siguiente hermano del nodo actual. Si no existe un hermano siguiente, retorna FALSE (< 4.3) o null (>= 4.3). Puede usar esta función para iterar sobre todos los hijos de un nodo como se muestra en el ejemplo.

Ejemplo #1 Iterar sobre los hijos

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

if (!
$dom domxml_open_mem($xmlstr)) {
  echo 
"Error durante el análisis del documento\n";
  exit;
}

$elements $dom->get_elements_by_tagname("tbody");
$element $elements[0];
$child $element->first_child();

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

Véase també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.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites