code/libraries/joomlatools/library/object/config/xml.php
protected static function _decodeValue($node)
    {
        switch ($node['type'])
        {
            case 'integer':
                $value = (string) $node;
                return (int) $value;
                break;

            case 'string':
                return (string) $node;
                break;

            case 'boolean':
                $value = (string) $node;
                return (bool) $value;
                break;

            case 'double':
                $value = (string) $node;
                return (float) $value;
                break;

            case 'array':
            default     :

                $value = array();
                foreach ($node->children() as $child) {
                    $value[(string) $child['name']] = self::_decodeValue($child);
                }

                break;
        }

        return $value;
    }
protected static function _decodeValue($node)
    {
        switch ($node['type'])
        {
            case 'integer':
                $value = (string) $node;
                return (int) $value;
                break;

            case 'string':
                return (string) $node;
                break;

            case 'boolean':
                $value = (string) $node;
                return (bool) $value;
                break;

            case 'double':
                $value = (string) $node;
                return (float) $value;
                break;

            case 'array':
            default     :

                $value = array();
                foreach ($node->children() as $child) {
                    $value[(string) $child['name']] = self::_decodeValue($child);
                }

                break;
        }

        return $value;
    }
protected static function _decodeValue ( $ node ) { switch ( $ node [ 'type' ] ) { case 'integer' : $ value = ( string ) $ node ; return ( int ) $ value ; break ; case 'string' : return ( string ) $ node ; break ; case 'boolean' : $ value = ( string ) $ node ; return ( bool ) $ value ; break ; case 'double' : $ value = ( string ) $ node ; return ( float ) $ value ; break ; case 'array' : default : $ value = array ( ) ; foreach ( $ node -> children ( ) as $ child ) { $ value [ ( string ) $ child [ 'name' ] ] = self :: _decodeValue ( $ child ) ; } break ; } return $ value ; }
Method to get a PHP native value for a SimpleXMLElement object

@param   object  $node  SimpleXMLElement object for which to get the native value.
@return  mixed  Native value of the SimpleXMLElement object.
Method to get a PHP native value for a SimpleXMLElement object