Over a million developers have joined DZone.

Simple 2.4 - Java XML Serialization

DZone's Guide to

Simple 2.4 - Java XML Serialization

· ·
Free Resource

Simple is an XML configuration and serialization framework for Java. It provides an annotated approach to XML serialization that offers full object graph serialization and deserialization for Android, Google App Engine, and Java 1.5+.

Simple XML Home

This contains various changes to constructor injection for better matching and also introduces a very useful new annotation called @Path. This path takes a single value, which is an XPath expression defining the location of either an attribute or element. For example


private String value;


Which produces a wrapper such as




This is fully backward compatible and can be used with any of the element annotations and also the attribute annotation. This allows an otherwise flat object definition to be mapped in to a more complex XML structure. Such mappings reduce the number of object definitions required and also improves the frameworks XML binding capabilities. For some examples, see the tutorial.

Simple XML Tutorial


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}