Sharing the Code

Programming stuff that might be useful to others

Tag: Java

Using JAXB 2

JAXB is a Java library for converting XML files into Java classes. It’s main use is in web services i.e. using WSDL files to generate Java classes but I also find it very useful for XML configuration files. So instead of transversing an XML configuration file using verbose DOM you transverse it as an object hierarchy instead. Unlike version 1, version 2 uses Java 1.5 generics which makes iterating over collections a lot easier.

Read more