Is there a way to manipulate the generated
mapping.xml so that I can group some instance variables(not collections) in
my object into subnodes of another user defined node that is not part
of the object itself?
For instance, if I have an object called Person and
it has the following instance variables
public String eyes
public String nose
public String ears
public String fingers
public String wrist
public String toes
The mapping file would give the class name node as
the root node and all the other instance variables as the inner nodes so that
the resultant marshaller xml would like something like this:
<Person>
<eyes></eyes>
<nose></nose>
...etc
</Person>
How can I do the following using the castor
marshaller or the mapping tool generator?
<Person>
<face> //user defined node
<eyes></eyes>
<nose></nose>
</face>
<limbs>
<fingers></fingers>
<wrist></wrist>
<toes></toes>
</limbs>
</Person>
Thanks
Pratibha
|