/**
  * @param mixed $value
  *
  * @return string
  */
 public function serialize($value)
 {
     $array = parent::serialize($value);
     $xmlData = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><data></data>');
     $this->arrayToXml($array, $xmlData);
     $xml = $xmlData->asXML();
     $xmlDoc = new DOMDocument();
     $xmlDoc->loadXML($xml);
     $xmlDoc->preserveWhiteSpace = false;
     $xmlDoc->formatOutput = true;
     return $xmlDoc->saveXML();
 }
 /**
  * @param mixed $value
  *
  * @return string
  */
 public function serialize($value)
 {
     return Yaml::dump(parent::serialize($value));
 }