// step1: create the jaxb context
JAXBContext jaxbContext = JAXBContext.newInstance("sdt.xml");
// step2: create the marshaller
Marshaller marshaller = jaxbContext.createMarshaller();
// set xml file output format: line breaks and indentation will appear
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, new Boolean(true));
// step3: marshals the content tree whose root is in the sdt object
//and writes it as an output stream to the XML file
marshaller.marshal(sdt, new FileOutputStream("c://helloworldSDT.xml"));