Keith Brown
Wed, 09 Jul 2008 08:49:23 -0700
I have the following XML
<PickItem>
<ID>5</ID>
<Status>New</Status>
<Tag>
<Tag Mapping stuff/>
</Tag>
<DestinationTag>
<Tag>
<Tag Mapping stuff/>
</Tag>
</DestinationTag>
</PickItem>
This is mapping to a class that implements this interface
public interface PickItem {
public int getID();
public void setID(int id);
public String getStatus();
public void setStatus(String status);
public Tag getTag();
public void setTag(Tag tag);
public Tag getDestinationTag();
public void setDestinationTag(Tag tag);
}
The current mapping that I have is...
<mapping name="PickItem" class=" PickItemImpl"
factory="ObjectFactory.createPickItem" >
<value name="ID" get-method="getID" set-method="setID" />
<value name="Status" get-method="getStatus"
set-method="setStatus"/>
<structure get-method="getTag" set-method="setTag" type="TagImpl"
usage="optional"/>
<structure get-method="getDestinationTag"
set-method="setDestinationTag" type="TagImpl" />
</mapping>
This will produce the following xml...
<PickItem>
<ID>5</ID>
<Status>New</Status>
<Tag>
<Tag Mapping stuff/>
</Tag>
<Tag>
<Tag Mapping stuff/>
</Tag>
</PickItem>
I understand why it works that way. I was just wondering how I can get
a mapping that will put in the <DestinationTag> as a parent to the
second Tag. Any ideas?
Thank you for the help
Keith
------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users