public function next()
    {
        if ( is_null( $this->xmlParser ) )
        {
            throw new ezcTranslationReaderNotInitializedException();
        }
        $valid = $this->xmlParser->valid();

        if ( $valid )
        {
            $newContext = array( trim( $this->xmlParser->getChildren()->name), array() );

            foreach ( $this->xmlParser->getChildren()->message as $data )
            {
                $translationItem = $this->parseSimpleXMLMessage( $data );

                if ( !is_null( $translationItem ) )
                {
                    $newContext[1][] = $translationItem;
                }
            }

            $this->currentContext = $newContext;
            $this->xmlParser->next();
        }
        else
        {
            $this->currentContext = null;
        }
    }
public function next()
    {
        if ( is_null( $this->xmlParser ) )
        {
            throw new ezcTranslationReaderNotInitializedException();
        }
        $valid = $this->xmlParser->valid();

        if ( $valid )
        {
            $newContext = array( trim( $this->xmlParser->getChildren()->name), array() );

            foreach ( $this->xmlParser->getChildren()->message as $data )
            {
                $translationItem = $this->parseSimpleXMLMessage( $data );

                if ( !is_null( $translationItem ) )
                {
                    $newContext[1][] = $translationItem;
                }
            }

            $this->currentContext = $newContext;
            $this->xmlParser->next();
        }
        else
        {
            $this->currentContext = null;
        }
    }
public function next ( ) { if ( is_null ( $ this -> xmlParser ) ) { throw new ezcTranslationReaderNotInitializedException ( ) ; } $ valid = $ this -> xmlParser -> valid ( ) ; if ( $ valid ) { $ newContext = array ( trim ( $ this -> xmlParser -> getChildren ( ) -> name ) , array ( ) ) ; foreach ( $ this -> xmlParser -> getChildren ( ) -> message as $ data ) { $ translationItem = $ this -> parseSimpleXMLMessage ( $ data ) ; if ( ! is_null ( $ translationItem ) ) { $ newContext [ 1 ] [ ] = $ translationItem ; } } $ this -> currentContext = $ newContext ; $ this -> xmlParser -> next ( ) ; } else { $ this -> currentContext = null ; } }
Advanced to the next context.

This method parses a little bit more of the XML file to be able to
return the next context.  If no more contexts are available it sets the
$currentContext member variable to null, so that the valid() method can
pick this up.  If there are more contexts available it reads the context
from the file and stores it into the $currentContext member variable.
This method is used for iteration as part of the Iterator interface.

@throws ezcTranslationReaderNotInitializedException when the reader is
not initialized with initReader().
@return void
Advanced to the next context .