Hi,

We use the Castor XML Code Generation tool to generate classes to access our
XML files (using an XSD file). We use those XML files to store configuration
data for our server application.
 
Our goal is: 
After the initial creation of the XSD file or after performing a change in
the XSD file, we don't want either to adapt our XML file manually nor to
write/adapt the code to create instances of the (new) data objects,
generated castor classes.

My question:
Is there a way that castor automatically creates the data objects using the
default values given by the XSD file respectively using the default
constructor for the appropriate classes ? 
The creation of data object and initializing their attributs with the
default values works well but as soon as we use complex-types containing
other complex-types, the created class does contain an attribute to the the
child complex-type but no object of that type is being created. But as
mentioned, I don't want to program the creation of the whole given data
structure.

Example:
------------------------------------------------------------
Extract from our XSD file:

<xs:complexType name="listenerType">
  <xs:all>
    <xs:element name="address" type="addrType" minOccurs="0"/>
  </xs:all>
</xs:complexType>
 .

Reply via email to