public function startDocument($data)
{
$this->checkStartDocument($data);
$this->isEmpty = true;
$this->xmlWriter = new \XMLWriter();
$this->xmlWriter->openMemory();
$this->xmlWriter->setIndent($this->formatOutput);
$this->xmlWriter->startDocument('1.0', 'UTF-8');
}