Jaxb is a great package for generating xml files. I put some sample code below. But, it depends on exactly how you are obtaining the data to put into your xml file. If you do not have the data anyplace you are going to have to enter it, maybe in a database , then use jaxb to format it into xml files. Anyway, maybe you can explain in detail what you are doing so we can offer specific help.
Here is some generic jaxb code:
JAXBContext jaxbContext = JAXBContext.newInstance(MyBean.class);
Marshaller marshaller = jaxbContext.createMarshaller();
marshaller.setProperty("jaxb.formatted.output",new Boolean(true));
//gather data method would be here, fill in your beans
File xml = new File(baseDir, "myXMLFIle.xml");
marshaller.marshal( listOfBeans, new FileOutputStream(xml));