Generate Java-XML Bindings Using JAXB

Stylus Studio® X16 XML Enterprise Suite now includes integrated support for the Java Architecture for XML Binding (JAXB), enabling you to generate Java class files from any XML schema. Powerful new JAXB tools provides a powerful, Java standards-based way to bind XML schemas to Java representations, making it easy for Java developers to incorporate XML data and processing functions in Java applications, directly within Stylus Studio® X16 XML Enterprise Suite, the world's leading developer tool for XML Schema. In this JAXB tutorial, we'll show you how easy it is to generate JAXB bindings!

Generating Java-XML Bindings

To start, launch the Stylus Studio® XML Schema Editor and develop any XML Schema data model, for example, a purchase order XML Schema. When you have finished visually developing the XML Schema data model, Select the "Generate Java Binding Classes" option from the XML Schema menu. as illustrated here:

Generate a Java-XML Binding

Specifying JAXB Properties

Stylus Studio® X16 XML Enterprise Suite supports several different options when it comes to generating JAXB code. For example, you can specify the JAXB target directory, the Java package name to use in the generated code, and other properties as shown here:

Java XML Binding Properties

Adding JAXB Java Files to Your Project

After having generated the Java XML bindings for you, Stylus Studio® X16 XML Enterprise Suite will next prompt you to optionally add the generated JAXB files (.zip file, 76 KB) to your Stylus Studio® project. In the following illustration, the Java XML binding classes are shown in the Stylus Studio® XML Project window. In the background you can see the JAXB code being viewed using the built-in Java IDE.

In summary, Stylus Studio® X16 XML Enterprise Suite allows you to seamlessly access JAXB Java-XML binding technologies directly from within our award winning XML schema tools, providing the a quick and easy way to generate standards-based Java XML bindings. Don't settle for other XML tools which resort to proprietary Java XML binding code generation schemes that are buggy and un-usable! Download a free trial of our XML and JAXB tools today!

Background Information: What is JAXB?

JAXB is a Java technology that enables you to generate Java classes from XML schemas by means of a JAXB binding compiler. The JAXB binding compiler takes XML schemas as input, and then generates a package of Java classes and interfaces that reflect the rules defined in the source schema. These generated classes and interfaces are in turn compiled and combined with a set of common JAXB utility packages to provide a JAXB binding framework.

The JAXB binding framework provides methods for unmarshalling XML instance documents into Java content trees - a hierarchy of Java data objects that represent the source XML data -- and for marshalling Java content trees back into XML instance documents. The JAXB binding framework also provides methods for validating XML content as it is unmarshalled and marshalled.

What this means is that your Java applications can work with schema-compliant XML data as Java objects, leveraging native Java security models and programming methods. Moreover, Java developers do not need to be well-versed in the intricacies of SAX or DOM processing models, or even in the arcane language of XML schema, to take advantage of ubiquitous, platform-neutral XML technologies.


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Try Stylus XML & Java IDE

Download a free trial of our award-winning XML & Java IDE today!

Learn Stylus Studio in 6 Minutes

Can six minutes change your life? A new action-packed online video demonstration covers how to use Stylus Studio in just six minutes! Watch this video and change the way you develop XML applications forever!

Ask Someone You Know

Does your company use Stylus Studio? Do your competitors? Engineers from over 100,000 leading companies use Stylus Studio, and now you can ask someone from your own organization about their experiences using Stylus Studio.

Free Java Code Generation Video Demonstration

A new online video demonstration shows just how easy it is to generate the Java code to make your XSLT and XQuery work in your Java apps.

JAXB Schema Reference

The Stylus Studio XML Schema Library contains (among other things) a complete reference of the JAXB 1.0 and JAXB 2.0 data models.

Free Stylus Studio XML Training:
W3C Member