Yes - if you just want to keep the <appId> values as Strings you should
be able to use a <value name="appId"> element as the only child of the
<collection> element (though it looks like I may have fixed something in
that area since RC0, so it's possible you might need the CVS code or
coming RC1 for this to work properly).
- Dennis
Mocky Habeeb wrote:
I think you just need to specify the type of items that will be in
your collection. Here is an explanation of how that can be done:
http://jibx.sourceforge.net/tutorial/binding-collects.html
Mocky
-----Original Message-----
*From:* [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] *On Behalf Of
*Karthikeyan Ganesh sarma
*Sent:* Monday, June 20, 2005 1:35 PM
*To:* [email protected]
*Subject:* [jibx-users] Binding xml to java objects
Hi,
I'm currently working on jibx xml binding for a client
project. I'm a newbie and require some help. I've created a xml
binding something like this
<mapping class="com.thc.ids.biz.parser.profile.UserProfile"
name="UserProfile">
<collection field="_appIds"></collection>
<collection field="_attributeIds"></collection>
</mapping>
and have a class
public class UserProfile{
ArrayList _appIds;
ArrayList _attributeIds;
}
and my xml can be any thing like
<UserProfile>
<appId>123</appId>
<appId>123</appId>
<appId>123</appId>
</UserProfile>
<UserProfile>
<attributeId>123</attributeId>
<attributeId>123</attributeId>
<attributeId>123</attributeId>
</UserProfile>
when i try to bind the xml, the compiler throws an exception
mapping not found for appId.
Please tell me how can i solve this problem.
Regards,
Karthik G
------------------------------------------------------------------------
Sajnaave or Dhoom machaale? Make your favourite song win!
<http://g.msn.com/8HMAENIN/2755??PS=47575> Vote [EMAIL PROTECTED] IIFA
Awards! -------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration
Strategies from IBM. Find simple to follow Roadmaps,
straightforward articles, informative Webcasts and more! Get
everything you need to get up to speed, fast.
http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________ jibx-users mailing
list [email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users