(PHP 5, PHP 7)
SimpleXMLIterator::rewind — Rewind to the first element
This method rewinds the SimpleXMLIterator to the first element.
锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷
没锟叫凤拷锟斤拷值锟斤拷
Example #1 Rewind to the first element
<?php
$xmlIterator = new SimpleXMLIterator('<books><book>PHP Basics</book><book>XML Basics</book></books>');
$xmlIterator->rewind();
var_dump($xmlIterator->current());
?>
锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�
object(SimpleXMLIterator)#2 (1) { [0]=> string(10) "PHP Basics" }