I have few 2
java objects which are populated from 2 different tables. I also have a predefined XML schema in place. The end goal is to generate a XML that confirms to the schema and has data populated from these 2 java objects.
What would be the best API to create XML that confirms to a schema and has data populated from these 2 java objects. I have already tried JAXB, but the problem with that approach is that JAXB generated 120+ Java Classes for 1 XML, which is a huge number, though the actual data we have exists in 2 different objects only.
Please suggest a good API to achieve this functionality.