JAXB 2 Architectural Components

Q

What Architectural Components are used in JAXB 2 and how they are related?

✍: FYIcenter.com

A

Java Architecture for XML Binding (JAXB) is a Java API that allows Java developers to map Java classes to XML representations. JAXB Version 2 consists of the following architectural components:

  • schema compiler: A schema compiler binds a source schema to a set of schema derived program elements. The binding is described by an XMLbased language, binding language.
  • schema generator: A schema generator maps a set of existing program elements to a derived schema. The mapping is described by program annotations.
  • binding runtime framework that provides Unmarshalling and Marshalling operations for accessing, manipulating and validating XML content using either schema derived or existing program elements.

Unmarshalling is the process of reading an XML document and constructing a tree of content objects. Each content object is an instance of either a schema derived or an existing program element mapped by the schema generator and corresponds to an instance in the XML document. Thus, the content tree reflects the document’s content. Validation can optionally be enabled as part of the unmarshalling process. Validation is the process of verifying that an xml document meets all the constraints expressed in the schema.

Marshalling is the inverse of unmarshalling, i.e., it is the process of traversing a content tree and writing an XML document that reflects the tree’s content. Validation can optionally be enabled as part of the marshalling process.

JAXB 2.0 Architecture Component Diagram

 

JAXB (Java Architecture for XML Binding) API Specification

⇒⇒FAQ for jaxb-*.jar - Java Architecture for XML Binding

2018-06-06, 321👍, 0💬