JAXB: XML Binding
Create, Validate XML Message and Edit XML Schema




                                     e-mail: goto.c...
Agenda


Create: Java binding class and XML message

Validate: XML Source (file, stream, etc.)

Edit: XML Schema
Create
JDK 6

JAXB: Java Architecture for XML Binding

  xjc: generate binding class

XML Schema file

Editor: NotePad++, T...
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:jxb="http://java.s...
# xjc [-options ...] schema




                 info: http://technology-related.com/javaee/5/docs/tutorial/doc/bnbah.html
# xjc -p net.sitdh.schema 
   schema/test.xsd




                 info: http://technology-related.com/javaee/5/docs/tutor...
Validate


XML Source (File, Stream, etc.)

Java Binding Class

XML Schema file
XML Schema
                 Binding Class
                                       Source


                             1  ...
1



    2

    3



4       5
Edit



XML Schema File

XML Schema Syntax
JAXB: Create, Validate XML Message and Edit XML Schema
JAXB: Create, Validate XML Message and Edit XML Schema
JAXB: Create, Validate XML Message and Edit XML Schema
JAXB: Create, Validate XML Message and Edit XML Schema
JAXB: Create, Validate XML Message and Edit XML Schema
JAXB: Create, Validate XML Message and Edit XML Schema
JAXB: Create, Validate XML Message and Edit XML Schema
JAXB: Create, Validate XML Message and Edit XML Schema
JAXB: Create, Validate XML Message and Edit XML Schema
Upcoming SlideShare
Loading in …5
×

JAXB: Create, Validate XML Message and Edit XML Schema

11,500 views

Published on

Explain how to generate java xml binding class from xml schema file validation xml message and editing xml schema

Published in: Technology
3 Comments
2 Likes
Statistics
Notes
No Downloads
Views
Total views
11,500
On SlideShare
0
From Embeds
0
Number of Embeds
3,064
Actions
Shares
0
Downloads
106
Comments
3
Likes
2
Embeds 0
No embeds

No notes for slide

JAXB: Create, Validate XML Message and Edit XML Schema

  1. 1. JAXB: XML Binding Create, Validate XML Message and Edit XML Schema e-mail: goto.champ@gmail.com
  2. 2. Agenda Create: Java binding class and XML message Validate: XML Source (file, stream, etc.) Edit: XML Schema
  3. 3. Create JDK 6 JAXB: Java Architecture for XML Binding xjc: generate binding class XML Schema file Editor: NotePad++, TextMate, vi, etc. Apache Ant
  4. 4. <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="2.0"> ... </xs:schema>
  5. 5. # xjc [-options ...] schema info: http://technology-related.com/javaee/5/docs/tutorial/doc/bnbah.html
  6. 6. # xjc -p net.sitdh.schema schema/test.xsd info: http://technology-related.com/javaee/5/docs/tutorial/doc/bnbah.html
  7. 7. Validate XML Source (File, Stream, etc.) Java Binding Class XML Schema file
  8. 8. XML Schema Binding Class Source 1 3 Content Valid 2 Objects 4 5 XML Source Validator Invalid
  9. 9. 1 2 3 4 5
  10. 10. Edit XML Schema File XML Schema Syntax

×