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);
        }
    }