protected function appendRecord(DOMDocument $dom, DOMElement $root, BaseModel $record, SchemaInterface $schema = null, $recursive = true)
{
if (!$schema) {
$schema = $record->getSchema();
}
$recordElement = $dom->createElement('record');
$recordElement->setAttribute('class', get_class($record));
$root->appendChild($recordElement);
$this->appendRecordInplace($dom, $recordElement, $record, $schema, $recursive);
}