protected static function convertXmlToArray(\SimpleXMLElement $data)
    {
        $result = [];
        foreach ((array) $data as $index => $node) {
            $result[$index] = (\is_object($node)) ? static::convertXmlToArray($node) : trim((string) $node);
        }

        return $result;
    }
protected static function convertXmlToArray(\SimpleXMLElement $data)
    {
        $result = [];
        foreach ((array) $data as $index => $node) {
            $result[$index] = (\is_object($node)) ? static::convertXmlToArray($node) : trim((string) $node);
        }

        return $result;
    }
protected static function convertXmlToArray ( \ SimpleXMLElement $ data ) { $ result = [ ] ; foreach ( ( array ) $ data as $ index => $ node ) { $ result [ $ index ] = ( \ is_object ( $ node ) ) ? static :: convertXmlToArray ( $ node ) : trim ( ( string ) $ node ) ; } return $ result ; }
Convert a string of XML to an associative array.

@param \SimpleXMLElement $data An XML element node.

@return array An array representing the XML data.
Convert a string of XML to an associative array .