What is JAXB ?

In this tutorial, we will learn What is JAXB ?  JAXB is Java Architecture for XML Binding. It is a standard way to bind XML schemas and Java representations to incorporate XML data and processing functions in Java applications. JAXB is an API for reading and writing Java objects to and from XML documents. JAXB provides methods for Marshalling java objects into XML and Unmarshalling an XML into its original java object. JAXB provides annotations to implement marshalling and unmarshalling. Some of the annotations in JAXB are: Some of the Annotations in…

Read More

Marshalling and Unmarshalling in Java using JAXB

In this tutorial, we will learn about Marshalling and Unmarshalling in Java using JAXB. How to convert an object into XML and XML back to object in Java ? JAXB provides a mechanism to convert an object into XML, this process is called as Marshalling and the reverse process of converting an XML back to Java object is called as Unmarshalling.  JAXB provides annotations to do the marshalling and unmarshalling. Let’s see Marshalling and Unmarshalling with an example using JAXB. Marshalling using JAXB: Create a Car.java object which needs to…

Read More