Posts Tagged ‘ jaxb

More Runtime Java Stack

Screws come in a variety of shapes and sizes f...

Image via Wikipedia

More java framework and APIs that I have been using.

you can find the first part this article here: java runtime stack Read more

Annotations have been more successful than XML

Annotations came to JDK with JDK5 (2004) since then they evaluated and are accepted so widely and even became more powerful and useful than XML in just 4 years.

While you are developing a project with java at any scale you’ll need a very large number of XML files defined in very different API’s and DTD/XSDs. Which makes configuration very complex.

eg:struts.xml,tiles.xml,validation.xml,hibernate.cfg.xml,spring-context.xml,web.xml,and so on

Although it is easy to read and modify there are lots files :(

Now with annotations:

Read more

JAXB quickstart via maven2

Apache Maven

Image via Wikipedia

JAXB is a java framework to XML-Java transformations.

JAXB is 2.1 has a very simple API like castor and jibx And annotation driven transformers. Although those configurations can be written manually JAXB has a code generator to generate java files from XSD files. Here is sample JAXB tutorial using maven2:

Read more