package eas.com;

import eas.com.entity.Author;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import java.io.File;

/**
 * Created by eduardo on 11/21/2016.
 * <p>
 * FROM XML to simple Java Object
 */
public class MainApp2 {

    public static void main(String[] args) throws JAXBException {

        File file = new File("author.xml");

        JAXBContext jaxbContext = JAXBContext.newInstance(Author.class);

        Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();

        Author author = (Author) jaxbUnmarshaller.unmarshal(file);

        System.out.println(author);
    }
}

@@ -349,17 +349,47 @@
 ption %7B%0A
+        /* File for Reading */
 %0A
-
         
@@ -421,24 +421,61 @@
 hor.xml%22);%0A%0A
+        /* init jaxb unmarshaller */%0A
         JAXB
@@ -535,17 +535,16 @@
 class);%0A
-%0A
         
@@ -606,24 +606,70 @@
 shaller();%0A%0A
+        /* unmarshaller xml to java object */%0A
         Auth
@@ -720,24 +720,55 @@
 hal(file);%0A%0A
+        /* print java object*/%0A
         Syst

Update MainApp2.java