protected function extractParam(\SimpleXMLElement $element)
    {
        $param = array();
        foreach ($element as $subElement) {
            if (count($subElement) === 0) {
                $param[$subElement->getName()] = (string)$subElement;
            } else {
                $param[$subElement->getName()] = $this->extractParam($subElement);
            }
        }

        return $param;
    }
protected function extractParam(\SimpleXMLElement $element)
    {
        $param = array();
        foreach ($element as $subElement) {
            if (count($subElement) === 0) {
                $param[$subElement->getName()] = (string)$subElement;
            } else {
                $param[$subElement->getName()] = $this->extractParam($subElement);
            }
        }

        return $param;
    }
protected function extractParam ( \ SimpleXMLElement $ element ) { $ param = array ( ) ; foreach ( $ element as $ subElement ) { if ( count ( $ subElement ) === 0 ) { $ param [ $ subElement -> getName ( ) ] = ( string ) $ subElement ; } else { $ param [ $ subElement -> getName ( ) ] = $ this -> extractParam ( $ subElement ) ; } } return $ param ; }
Extract array params

@param \SimpleXMLElement $element
@return array
Extract array params