private function formatMetadata(array $data)
{
$metadata = '';
foreach ($data as $key => $value) {
if (is_array($value)) {
$metadata .= '<tag key="' . $key . '">';
$metadata .= $this->formatArray($value);
$metadata .= '</tag>';
continue;
}
$metadata .= '<tag key="' . $key . '">' . $this->formatValue($value) . '</tag>';
}
return $metadata;
}