users@jaxb.java.net

Re: Generating Java code from XML instance?

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Wed, 9 Jul 2008 13:56:07 +0200

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?

Could you give an example?

Bye.
/lexi