What is JAXB Unmarshalling?

JAXB Marshal UnMarshal

Using JAXB Unmarshalling  operation-  we can convert XML file to Java object and using JAXB Marshalling operation we can convert Java object into XML. Also Check our previous tutorial for JAXB Marshalling.

 

JAXB UnMarshalling Example – XML to Java Binding

Unmarshall-XML-To-Java

In this tutorial we will create a java program to perform unmarshalling operation for converting XML file into Java Object. This programme have Company, Department, Employee Java object and DateFormatAdapter (For handling complex types unmarshaling at field level in our case LocalDate Field in Company.java class) same as previous marshalling tutorial.

1)  Company.java

2) Department.java

 

3) Employee.java

 

4) DateFormatAdapter.java

 

5) UnMarshallingXMLToJavaJaxbDemo1.java

Console Output of the above programme:

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *