Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.xml.bind.JAXBException;
- import java.io.File;
- public class Main {
- public static void main(String[] args) {
- Parser parser = new JaxbParser();
- File file = new File("elements.xml");
- JaxbRoot root = new JaxbRoot();
- try {
- parser.saveObject(file, root);
- System.out.println(parser.getObject(file, JaxbRoot.class));
- } catch (JAXBException e) {
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement