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.
SimpleXMLIterator クラス
導入
...
クラス概要
SimpleXMLIterator
SimpleXMLIterator
extends
SimpleXMLElement
implements
RecursiveIterator
,
Traversable
,
Iterator
,
Countable
{
/* メソッド */
}目次
- SimpleXMLIterator::current — 現在の SimpleXML エントリを返す
- SimpleXMLIterator::getChildren — SimpleXML である場合、現在のエントリに対するイテレータを返す
- SimpleXMLIterator::hasChildren — 現在のエントリが SimpleXML オブジェクトかどうかを返す
- SimpleXMLIterator::key — 現在の SimpleXML のキーを返す
- SimpleXMLIterator::next — 次のエントリに移動する
- SimpleXMLIterator::rewind — SimpleXML を最初に巻き戻す
- SimpleXMLIterator::valid — SimpleXML がまだエントリを持っているかどうかをチェックする
SimpleXMLIterator
David Lanstein
18-Jan-2009 04:40
18-Jan-2009 04:40
