dev@jaxb.java.net

Binding Declaration of _at_XmlJavaTypeAdapter

From: Mark Hansen <mark_at_javector.com>
Date: Thu, 27 Oct 2005 18:51:39 -0400

When I do "Start from Java" to generate XML Schema from an annotated
POJO, I can use the @XmlJavaTypeAdapter to insert a custom type mapping.

I can't see how to do the equivalent going the other way - "Start from
XML". The <javaType> binding declaration seems to be only for atomic
datatypes. While <property> seems to be restricted to substituting Java
classes up/down the class hierarchy from the default class.

In other words, can I use a binding declaration to map a schema type to
an arbitrary POJO? Maybe not, I guess, because how would such a POJO
get the proper annoations?

So, is the only way to "Start from XML" and get to an existing POJO is
to use the <dom> declaration and do the custom marshal from the
resulting org.w3c.dom.Element inside the application code?

Thanks,

Mark