protected function formatLibXmlError(LibXMLError $error) { return sprintf('%s in %d:%d: %s', $this->errorTypes[$error->level], $error->line, $error->column, trim($error->message)); }