Platinum Partner

Simple 2.4 - Java XML Serialization

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

 

@Path("path/to/element")
private String value;
 

 

Which produces a wrapper such as

 

<path>
   <to>
      <element>
         ...

 

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

{{ tag }}, {{tag}},

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

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}