users@jaxb.java.net

How do you pick up default values from XSD/JAXB

From: Gary Gregory <ggregory_at_seagullsw.com>
Date: Mon, 02 Jun 2003 19:06:36 -0400

My XSD defines default values for a bunch of attributes.

I have some code that reads our apps configuration files with JAXB. In the
case where the config file is missing, I pass in a JAXB generated class that
I instantiate with:

FooBarType t = new ObjectFactory().createMyFooBar();
t.setFoo(xxx);
t.setBar(yyy);

Obviously, this is lame and must be updated everytime I change the default
values in the XSD. How can I pick up the values I defined in the XSD?

Thanks,
Gary