I got. a Kotlin compiler error when I try to enable the XML processing information. I'm using the latest version 2.16.1.
fun generateReport(reportModel: Model): String {
val xmlMapper = XmlMapper().registerModule(KotlinModule.Builder().build()).apply {
// Next line I got the error. The compiler can't find an appropriate implementation. Also enable, does not work.
factory.configure(ToXmlGenerator.Feature.WRITE_XML_1_1, true)
}
return xmlMapper.writeValueAsString(reportModel)
}