Hi Tamas,

You can probably do what you want - associate the first item in a list of repeated items in the XML with a field, then use the rest of the items as a collection - directly in the binding. Assuming you've got a wrapper element for your collection (that just surrounds the items in the collection) and a mapping for the collection items, you're probably using a binding like:

 <collection name="wrapper" ...>
   <structure name="item" map-as="ItemType">
 </collection>

You can change this to instead be:

 <structure name="wrapper" ...>
   <structure name="item" field="firstItemField" map-as="ItemType"/>
   <collection ...>
     <structure name="item" map-as="ItemType"/>
   </collection>
 </structure>

 - Dennis

Tamas Hegedus wrote:

Yes!
I am getting better, isn't it? :-)
And I am getting more and more to like jibx.

post-set works fine. Exactly what I wanted.

==============
XML validation?

Tamas Hegedus wrote:

Hm. I think I try to use a "post-set" on my collection...





-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to