// options needed
// 1. filename/path of CHANGELOG
// 2. mapping file for customization
// 3. output file name
XMLContext xmlContext = new XMLContext();
ChangeLog2XML parser = xmlContext.createChangeLog2XML();
try {
File file = new File(DEFAULT_FILE);
Changelog changelog = parser.parse(file);
file = new File(DEFAULT_OUTPUT);
FileWriter writer = new FileWriter(file);
xmlContext.setProperty(XMLProperties.USE_INDENTATION, true);
Marshaller marshaller = xmlContext.createMarshaller();
marshaller.setWriter(writer);
marshaller.setRootElement("changelog");
marshaller.setSuppressXSIType(true);
marshaller.marshal(changelog);