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

search for in the

SimpleXMLIterator::current> <RecursiveIteratorIterator::valid
Last updated: Fri, 03 Jul 2009

view this page in

The SimpleXMLIterator class

Introduction

The SimpleXMLIterator provides recursive iteration over all nodes of a SimpleXMLElement object.

Class synopsis

SimpleXMLIterator
SimpleXMLIterator extends SimpleXMLElement implements RecursiveIterator , Traversable , Iterator , Countable {
/* Methods */
mixed current ( void )
object getChildren ( void )
bool hasChildren ( void )
mixed key ( void )
void next ( void )
void rewind ( void )
bool valid ( void )
}

Table of Contents



add a note add a note User Contributed Notes
SimpleXMLIterator
David Lanstein
18-Jan-2009 02:40
Unlike the DirectoryIterator, for one, you'll need to call $it->rewind() before using the iterator in a for() or while() loop.  Calling foreach() does rewind the iterator before iteration.

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