I inherited some Java code that gets data from an XML file and inserts the data into Microsoft Word document. The Java code uses two files as input. One is the XML file with data and the other is a Microsoft Word Document which is used as a template for the output file. The Word template has Content Control objects which are mapped to XML tags from the XML file. When the Java program is executed, it uses the Word template and the XML file to "bind" the two files together using the XML mappings in the Word template. The output from the code is a Word document in the format of the template, but with updated data from the XML file.
The binding is from the DOCX4J Library namely "Docx4J.bind()". This method uses JAXB.Content from a jar named Javax.xml.bind.JAXBContext. The problem is the JAXB library and methods are all deprecated and completely removed from Java 9 and forward. So it appears the only way to make this bind method work is to stay in Java version 8. I have been asked to find an alternative to JAXB.Context so that the Java code can be compiled and run in a Java 13 environment.
My question is this: Is there a comparable replacement for JAXB in Java 11,12 or 13? If so, can you please point me to some documentation to find out more about it. Thanx for your input and help.