SimpleXMLIterator::next

(PHP 5, PHP 7)

SimpleXMLIterator::nextMove to next element

说锟斤拷

public SimpleXMLIterator::next ( void ) : void

This method moves the SimpleXMLIterator to the next element.

锟斤拷锟斤拷

锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷

锟斤拷锟斤拷值

没锟叫凤拷锟斤拷值锟斤拷

锟斤拷锟斤拷

Example #1 Move to the next element

<?php
$xmlIterator 
= new SimpleXMLIterator('<books><book>PHP Basics</book><book>XML basics</book></books>');
$xmlIterator->rewind(); // rewind to the first element
$xmlIterator->next();

var_dump($xmlIterator->current());
?>

锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�

object(SimpleXMLIterator)#2 (1) {
  [0]=>
  string(10) "XML basics"
}