users@jaxb.java.net

JAXB - Automatic creation of mandatory children

From: kr vijay <sagivijay_at_yahoo.com>
Date: Tue, 21 Sep 2004 00:06:23 -0700 (PDT)

Hi,
I have a web-based application to edit an XML file. I
am using JAXB to convert my XML file to Java objects.

I am facing a problem. Whenever I want to create a new
element, I am also forced to create all the mandatory
child elements and set them in the object for the new
element.

This becomes a real pain since the number of elements
I create and the number of mandatory children each
element has is really huge, I am writing a lot of code
for creating and setting these objects.

Is there a way in JAXB that creates all these
mandatory children automatically whenever I create the
parent object.

I assume this has got to do with the way the classes
are generated. At present, there is no such code
generated for creating mandatory children.

Please let me know if this can be done by any means.

Thanks,
Vijay

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net