Loading
Jaxb VS XMLBeans

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  Jaxb VS XMLBeans ?


Ans)

JAXB:
The JAXB binding compiler translates a W3C XML Schema into one or more Java classes,
a jaxb.properties file, and possibly other files, depending on the specific implementation
of JAXB. Alternatively, JAXB2 offers a way to generate a schema from annotated Java classes.

Below is the call to generate the JAXB classes from an XML schema:
xjc -d out Example.xsd


XMLBeans:
XMLBeans is an XML binding tool that has full XML Schema support, and offers full XML Infoset
fidelity. It takes a different approach to that of most other O/X mapping frameworks,
in that all classes that are generated from an XML Schema are all derived from XmlObject,
and contain XML binding information in them.

Below is the call to generate the JAXB classes from an XML schema:
scomp -d out -srconly Example.xsd

Both XMLBeans and JAXB produce Java models that make it easy for developers to interact with XML.
The JAXB model however is annotated POJOs which has the following advantages:

i) JPA annotations could easily be applied to the JAXB model enabling the model to be persisted
in a relational database.
ii) Once generated the JAXB model could be modified to handle changes in the XML schema,
the XMLBeans model would need to be regenerated.
iii) Starting with Java SE 6 no additional compile/runtime dependencies are required
for the JAXB model.
iv)There are multiple JAXB implementations available: EclipseLink MOXy, Metro,
Apache JaxMe, etc.
v)JAXB is the standard binding layer for JAX-WS (SOAP) and JAX-RS (RESTful) Web Services.
vi) In XMLbeans you can traverse any element by using Xpath/XQuery, but in Jaxb.



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Jaxb VS XMLBeans


Jaxb VS XMLBeans

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free