Category: JAX-B

xml tutorials

Generate XSD from Java Classes

In this tutorial we show you how to generate XSD from Java Classes using java binding annotations. Java Classes can be converted into XSD schema and vice versa using the jaxb2-maven-plugin. We can specify...
xml tutorials

Generate Java Classes From XSD

This example shows you how to generate Java Classes from XSD using jaxb2-maven-plugin. This plugin uses the XJC which is a JAXB Binding compiler tool that can generate Java Classes from XSD. Maven Project...
xml tutorials

Convert XML to Polymorphic Object using JAX-B

Here is an example of how you can convert XML to polymorphic objects using JAX-B. Abstract Animal Class package com.memorynotfound.xml.jaxb; public abstract class Animal { } Cat Inherits from Animal package com.memorynotfound.xml.jaxb; import javax.xml.bind.annotation.XmlRootElement;...
xml tutorials

Convert Polymorphic Object to XML using JAX-B

When you use polymorphism in your classes and you want to convert your object to XML using JAX-B, here is an example how to. Abstract Animal Class package com.memorynotfound.xml.jaxb; public abstract class Animal {...
xml tutorials

Convert XML to Object in Java using JAX-B

In the following tutorial we will show you how you can convert XML to Object in Java using JAX-B. Annotations Explained First we need to define our model that will be converted to XML...
xml tutorials

Convert a Java Object to XML using JAXB

In the following tutorial we will show you how you can convert a Java Object to XML. Annotations Explained First we need to define our model that will be converted to XML representation. Here...