J A X B _ Test of SlideShare

 Slides

 39 views
of 6
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Description
1. JAXB: Java Architecture for XML Bindings Anuja Shukla MIG 2. What is JAXB ?  <ul><li>JAXB defines the behavior of a standard set of tools and interfaces…
Share
Transcript
  • 1. JAXB: Java Architecture for XML Bindings Anuja Shukla MIG
  • 2. What is JAXB ?  <ul><li>JAXB defines the behavior of a standard set of tools and interfaces that automatically generate java class files from XML schema </li></ul><ul><li>JAXB is a framework or architecture , not an implementation. </li></ul><ul><li>Sun provides a reference implementation of JAXB with the Web Services Developers kit, available as a separate download http://java.sun.com/webservices/downloads/webservicespack.html </li></ul>
  • 3. SAX vs. DOM vs. JAXB <ul><li>SAX: Parser starts at the beginning of the document and passes each piece of the document to the application in the sequence it finds it. </li></ul><ul><li>Nothing is saved in memory. </li></ul><ul><li>The application can take action on the data as it gets it from the parser, but it can't do any in-memory manipulation of the data. For example, it can't update the data in memory and return the updated data to the XML file. </li></ul>
  • 4. SAX vs. DOM vs. JAXB <ul><li>DOM : Parser creates a tree of objects that represents the content and organization of data in the document. </li></ul><ul><li>The tree exists in memory. </li></ul><ul><li>The application can then navigate through the tree to access the data it needs, and if appropriate, manipulate it. </li></ul>
  • 5. SAX vs. DOM vs. JAXB <ul><li>JAXB: Bind the schema for the XML document </li></ul><ul><li>Unmarshal the document into Java content objects. The Java content objects represent the content and organization of the XML document, and are directly available to the program. </li></ul><ul><li>After unmarshalling, program can access and display the data in the XML document simply by accessing the data in the Java content objects and then displaying it. </li></ul>
  • 6. Advantages of JAXB <ul><li>No need to create and use a parser and no need to write a content handler with callback methods. </li></ul><ul><li>Developers can access and process XML data without having to know XML or XML processing. </li></ul><ul><li>Using STAX(Streaming API for XML), comes inclusive in JAXB API, one can also define the part(s) of xml to be unmarshalled and hence further reducing the memory load. </li></ul><ul><li>New XML documents can also be created using Marshalling </li></ul>
  • Related Search
    Similar documents
    View more...
    We Need Your Support
    Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

    Thanks to everyone for your continued support.

    No, Thanks