src/Common/Internal/Serialization/XmlSerializer.php
private function _sxml2arr($sXml, $arr = null)
    {
        foreach ((array) $sXml as $key => $value) {
            if (is_object($value) || (is_array($value))) {
                $arr[$key] = $this->_sxml2arr($value);
            } else {
                $arr[$key] = $value;
            }
        }

        return $arr;
    }
private function _sxml2arr($sXml, $arr = null)
    {
        foreach ((array) $sXml as $key => $value) {
            if (is_object($value) || (is_array($value))) {
                $arr[$key] = $this->_sxml2arr($value);
            } else {
                $arr[$key] = $value;
            }
        }

        return $arr;
    }
private function _sxml2arr ( $ sXml , $ arr = null ) { foreach ( ( array ) $ sXml as $ key => $ value ) { if ( is_object ( $ value ) || ( is_array ( $ value ) ) ) { $ arr [ $ key ] = $ this -> _sxml2arr ( $ value ) ; } else { $ arr [ $ key ] = $ value ; } } return $ arr ; }
Converts a SimpleXML object to an Array recursively
ensuring all sub-elements are arrays as well.

@param string $sXml The SimpleXML object
@param array  $arr  The array into which to store results

@return array
Converts a SimpleXML object to an Array recursively ensuring all sub - elements are arrays as well .