users@jaxb.java.net

Generating Java code from XML instance?

From: Jason Harrop <jharrop_at_gmail.com>
Date: Wed, 9 Jul 2008 20:54:38 +1000

Hi

I've used XJC to generate some classes from a schema, and I'm happily
marshalling and unmarshalling. JAXB is fantastic for this.

What I'm wondering now, is whether given a snippet of XML, there is
something that could automatically generate Java code to produce objects
which could be marshalled to that XML. I'd expect such code to make liberal
use of ObjectFactory...

I'm well aware I could unmarshall the snippet of XML to produce those Java
objects, but I'm specifically interested in being able to generate some
code. One way to create such code might be as a by product of the
unmarshalling process?

thanks

Jason