I should probably also note that the different objects map to different
classes as the attributes/Children elements that they may hold are
different.
So element ABC would map to a Class of Type ABC. So if isn't as
straight forward as my simplified example.
Thanks for the help.
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bret
Gregory
Sent: Thursday, April 19, 2007 11:00 AM
To: jibx-users@lists.sourceforge.net
Subject: [jibx-users] Custom Unmarshaller
I am running into an issue where I am trying to map an element and its
children into several Lists on the parent object
Using a Custom Unmarshaller.
The parent object would have 3 lists:
List _abc
List _def
List _xyz
I have something like this:
<ParentObj>
<OtherElements>...</OtherElements>
<OBJs>
<OBJ id="1" name="an object abc">
<ABC value="testABC" date"04-05-2007"/>
</OBJ>
<OBJ id="2" name="an object def">
<DEF value="testDEF" date="04-05-2007"/>
</OBJ>
<OBJ id="3" name="an object xyz">
<XYZ value="testDEF" date="04-05-2007"/>
</OBJ>
<OBJ id="4" name="an object def2">
<DEF value="testDEF2" date="04-05-2007"/>
</OBJ>
</OBJs>
</ParentObj>
I wrote a custom unmarshaller to handle the creation of the various
object instances.
But when I try to call to it in my structure:
<structure name="OBJs" marshaller="ObjMarshaller"
unmarshaller="ObjUnmarshaller"/>
I get the error:
Warning: No object for structure; marshaller attribute ignored;
I was sorta hoping that the Object for the structure would be the parent
object.
Is there a way to do this or at least get a similar result? Is there a
way to pass in a
Reference to the current object instead of pointing the structure to a
contained reference?
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users