JAXB annotation overview

JAXB Overview:

JAXB stands for Java Architecture for XML Binding (JAXB). It provides the functionality of converting java objects to and from xml.
Note: Marshalling is the process of converting java object into xml file. Unmarshalling is the process of converting xml into java object.

JAXB Annotations:

1. @XmlRootElement: It is used to define the xml root element. Default is class name.
2. @XmlType: It is used to define the order in which xml elements are written.
3. @XmlElement: It is used to define the field which have to be included in the xml file.
4. @XMLTransient: It is used to define the field which not have to be included in xml file.
5. @XmlAttribute: It is used to define the attribute.
 

Related Topics:

How to build java project using ant in eclipse?
JAXB marshalling – convert java object to xml example.
How to create pdf file in java using iText jar?
Generics class example.
OGNL in struts 2.
Hibernate One-to-One Mapping using xml.
Send inline image in email using JavaMail API.
Quartz 2 JobListener example.