close
例
<?php
$xmlIterator = new SimpleXMLIterator('<books><book>PHP Basics</book><book>XML basics</book></books>');
$xmlIterator->rewind(); //後退到第一個元素
$xmlIterator->next();
var_dump($xmlIterator->current());
?>
The above example will output:
object(SimpleXMLIterator)#2 (1) {
[0]=>
string(10) "XML basics"
}
全站熱搜
留言列表