Inheritance: extends XmlBase
 function convert($xmlString)
 {
     $inputDocument = $this->createDocument($xmlString);
     $this->removeComments($inputDocument);
     $convertedDocument = $this->converter->convert($inputDocument);
     // Needed by some disabled output escaping (eg. legacy ezxml paragraph <line/> elements)
     $convertedDocumentNormalized = new DOMDocument();
     $convertedDocumentNormalized->loadXML($convertedDocument->saveXML());
     $errors = $this->validator->validate($convertedDocument);
     $result = $convertedDocumentNormalized->saveXML();
     if (!empty($errors)) {
         $this->logger->error("Validation errors when converting xmlstring", ['result' => $result, 'errors' => $errors, 'xmlString' => $xmlString]);
     }
     return $result;
 }