I haven’t tried this, but it looks interesting. It seems to be designed to
help break the dependency between the XML structure and the structure of your
code. With most data binding libraries, you either make your api mirror the
structure of the XML, or you transform the data to match your API. This lets
you map data from the XML directly onto Java objects using XPath and
annotations.
Take a look at the XMLBeam introduction page.
Access XML data directly via XPath-annotated Java interfaces:
<xml>
<example>
<content type="foo" >bar</content>
</example>
</xml>
public interface Example {
@XBRead("/xml/example/content")
String getContent();
@XBRead("/xml/example/content/@type")
String getType();
}