Presentation is loading. Please wait.

Presentation is loading. Please wait.

JAXB Java Architecture for XML Binding Andy Fanton Khalid AlBayat.

Similar presentations

Presentation on theme: "JAXB Java Architecture for XML Binding Andy Fanton Khalid AlBayat."— Presentation transcript:

1 JAXB Java Architecture for XML Binding Andy Fanton Khalid AlBayat

2 Outline What is JAXB? Benefits of JAXB JAXB Implementation Components Goals of JAXB JAXB Binding Process Demo

3 JAXB Overview JAXB provides an easy way to bind XML schemas to Java representations. JAXB makes it easy to incorporate XML functions into Java applications without having to know much about the particulars of XML. The binding framework facilitates the unmarshalling of XML documents into Java content trees and vice versa.

4 General JAXB Overview

5 Isolating the Binding from the Implementation process provides some benefits: The size of the JAXB binding implementation is small and efficient as compared to SAX and DOM. One could focus on writing schemas and generating JAXB packages which could be shared among different applications. JAXB bindings can be customized to suit the users’ particular needs e.g. customizing package, interface or property names.

6 Goals of JAXB Makes it easier to use Java applications to read, process and output XML data. Provides flexible, extensible, platform- neutral formats and protocols for structuring and exchanging information. Easy to access and modify XML documents within Java programs. Ability to customize the binding of existing schema to Java representations

7 …Goals and Uses of JAXB Portability &Provide clean “round-tripping”. Access configuration values from a properties file stored in XML format. Create tools to manipulate configuration properties file represented in XML format. Update data received in the form of XML document without having to write SAX event handlers.

8 Core JAXB Components

9 Core Components of JAXB Implementation XML SchemaXML Schema Binding DeclarationsBinding Declarations Binding CompilerBinding Compiler Binding Framework ImplementationBinding Framework Implementation Schema-Derived ClassesSchema-Derived Classes Java ApplicationJava Application XML Input DocumentsXML Input Documents XML Output DocumentsXML Output Documents

10 JAXB Binding Process

11 Steps in the JAXB Binding Process Generate Classes Compile Classes Unmarshal Generate Content Tree Validate (Optional) Process Content Marshal

Download ppt "JAXB Java Architecture for XML Binding Andy Fanton Khalid AlBayat."

Similar presentations

Ads by Google