Monthly Archives: September 2014

Java XML – JAXB – Java Architecture for XML Binding

Java XML – JAXB – Java Architecture for XML Binding

What is JAXB?

  • Provides API, tools & framework that automate the mapping between XML documents and Java objects
  • Provides compiler that compiles XML schema to Java Classes


  • Provides efficient and standard way of mapping between XML and Java Code
  • JAXB is a high level language while JAXP, SAX, DOM are assembly language for XML document management
  • Easy to use, Customizable, portable

In JAXB, you are going to create Java classes from XML schema

How to use JAXB?

 JAXB Architecture

JAXB Architecture


  • JAXB Binding Compiler is basically xjc: %JAVA_HOME%/bin/xjc
  • Binding Declaration: Binding Customization File
  • XJC creates Java classes from schema
  • Java code reads xml document instance & create into java object (Unmarshal) & object can be them manipulated
  • Java object could be write down to XML document (Marshal)


Other Java/XML technologiesSAX, DOM, JAXP



– JAXB Entity

– Marshalling

– Unmarshalling


– Schema


– schema vs xml


– Binding


Web Services JAXB Basics – Youtube Video