src/Genesis/Parsers/XML.php
public function processElement(&$reader, &$tree)
    {
        $name = $reader->name;

        if (isset($tree->$name)) {
            if (is_a($tree->$name, 'stdClass')) {
                $currentEl = $tree->$name;

                $tree->$name = new \ArrayObject();

                $tree->$name->append($currentEl);
            }

            if (is_a($tree->$name, 'ArrayObject')) {
                $tree->$name->append(($reader->isEmptyElement) ? '' : $this->readerLoop($reader));
            }
        } else {
            $tree->$name = ($reader->isEmptyElement) ? '' : $this->readerLoop($reader);
        }
    }
public function processElement(&$reader, &$tree)
    {
        $name = $reader->name;

        if (isset($tree->$name)) {
            if (is_a($tree->$name, 'stdClass')) {
                $currentEl = $tree->$name;

                $tree->$name = new \ArrayObject();

                $tree->$name->append($currentEl);
            }

            if (is_a($tree->$name, 'ArrayObject')) {
                $tree->$name->append(($reader->isEmptyElement) ? '' : $this->readerLoop($reader));
            }
        } else {
            $tree->$name = ($reader->isEmptyElement) ? '' : $this->readerLoop($reader);
        }
    }
public function processElement ( & $ reader , & $ tree ) { $ name = $ reader -> name ; if ( isset ( $ tree -> $ name ) ) { if ( is_a ( $ tree -> $ name , 'stdClass' ) ) { $ currentEl = $ tree -> $ name ; $ tree -> $ name = new \ ArrayObject ( ) ; $ tree -> $ name -> append ( $ currentEl ) ; } if ( is_a ( $ tree -> $ name , 'ArrayObject' ) ) { $ tree -> $ name -> append ( ( $ reader -> isEmptyElement ) ? '' : $ this -> readerLoop ( $ reader ) ) ; } } else { $ tree -> $ name = ( $ reader -> isEmptyElement ) ? '' : $ this -> readerLoop ( $ reader ) ; } }
Process XMLReader element

@param $reader
@param $tree

@SuppressWarnings(PHPMD.ElseExpression)
Process XMLReader element