public function prepareArrayBeforeToXmlConvert(array $data, $primaryKey = '')
    {
        $result = [];
        $iterator = new RecursiveArrayIterator($data);
        $this->arrayWalk($iterator, $result, '');

        return '' !== (string) $primaryKey ? [$primaryKey => $result] : $result;
    }