the same definition in errorsAddToXML and errorsAsXML