src/Genesis/Parsers/XML.php
public function readerLoop($reader)
    {
        $tree = new \stdClass();

        while ($reader->read()) {
            switch ($reader->nodeType) {
                case \XMLReader::END_ELEMENT:
                    return $tree;
                    break;
                case \XMLReader::ELEMENT:
                    $this->processElement($reader, $tree);

                    if ($reader->hasAttributes) {
                        $this->processAttributes($reader, $tree);
                    }
                    break;
                case \XMLReader::TEXT:
                case \XMLReader::CDATA:
                    $tree = \Genesis\Utils\Common::stringToBoolean(
                        trim($reader->expand()->textContent)
                    );
                    break;
            }
        }

        return $tree;
    }
public function readerLoop($reader)
    {
        $tree = new \stdClass();

        while ($reader->read()) {
            switch ($reader->nodeType) {
                case \XMLReader::END_ELEMENT:
                    return $tree;
                    break;
                case \XMLReader::ELEMENT:
                    $this->processElement($reader, $tree);

                    if ($reader->hasAttributes) {
                        $this->processAttributes($reader, $tree);
                    }
                    break;
                case \XMLReader::TEXT:
                case \XMLReader::CDATA:
                    $tree = \Genesis\Utils\Common::stringToBoolean(
                        trim($reader->expand()->textContent)
                    );
                    break;
            }
        }

        return $tree;
    }
public function readerLoop ( $ reader ) { $ tree = new \ stdClass ( ) ; while ( $ reader -> read ( ) ) { switch ( $ reader -> nodeType ) { case \ XMLReader :: END_ELEMENT : return $ tree ; break ; case \ XMLReader :: ELEMENT : $ this -> processElement ( $ reader , $ tree ) ; if ( $ reader -> hasAttributes ) { $ this -> processAttributes ( $ reader , $ tree ) ; } break ; case \ XMLReader :: TEXT : case \ XMLReader :: CDATA : $ tree = \ Genesis \ Utils \ Common :: stringToBoolean ( trim ( $ reader -> expand ( ) -> textContent ) ) ; break ; } } return $ tree ; }
Read through the entire document

@param \XMLReader $reader
@return mixed
Read through the entire document