<mapping name="plant" class="...PlantNode">
<collection field="...">
<structure type="...PlantAreaNode" usage="optional"/>
<structure type="...WorkCenterNode" usage="optional"/>
<structure type="...MachineNode" usage="optional"/>
</collection>
</mapping>My apologies for taking so long to respond to this and other questions over the last couple of weeks. I've been pushing to get the beta 4 code to a working state, along with some travel and other projects.
- Dennis
Chris Huisman wrote:
Hello,
I am trying to map a treenode structure from my java class to an xml file. Now all of the objects that I am trying to map extend my custom TreeClass which extends TreeNode. Of course with each node in the tree I can easily obtain an ArrayList of the children of this node. Unfortunately certain nodes contain more information than other ones, for example a child can be any number of objects such as a Plant, a PlantArea, a WorkCenter, or a Machine .
So the xml file looks like:
<enterprise>
- an enterprise can contain zero to n plants, plantAreas, workCenters or machines.
<plant>
- a plant can contain zero to n plantAreas, workCenters, or machines
<plantArea>
- a plantArea can contain zero to n workCenters or machines
<workCenter>
- a workCenter can contain zero to n machines
<machine></machine>
</workCenter>
<machine></machine>
</plantArea>
<machine></machine>
</plant>
<workCenter>
<machine></machine>
</workCenter>
<machine></machine>
</enterprise>
were each of the objects extend TreeClass. I guess my question is, how do I map this type of xml file were the elements do not follow a specific hierarchy and the collection type is a superclass?
Thanks,
Chris Huisman.
------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users
