1 / 11

JAXB Java Architecture for XML Binding

JAXB Java Architecture for XML Binding. Andy Fanton Khalid AlBayat. Outline. What is JAXB? Benefits of JAXB JAXB Implementation Components Goals of JAXB JAXB Binding Process Demo. JAXB Overview. JAXB provides an easy way to bind XML schemas to Java representations.

yamal
Download Presentation

JAXB Java Architecture for XML Binding

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JAXBJava 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 Schema • Binding Declarations • Binding Compiler • Binding Framework Implementation • Schema-Derived Classes • Java Application • XML Input Documents • XML 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

More Related