Mapping structure with RestKit

scottay

New Member
I am developing for iOS, and I am mapping an XML file with RestKit v0.20.I have mapped successfully another files, but I have a problem with this file:\[code\]<setlist versionId="6bfd2ea2" lastUpdated="2013-04-07T18:33:28.000+0000" lastFmEventId="3431461" id="23d8f8ab" eventDate="04-04-2013"> <artist tmid="1388154" sortName="Mumford & Sons" name="Mumford & Sons" mbid="c44e9c22-ef82-4a77-9bcd-af6c958446d6" disambiguation="">...</artist> <venue name="Alsterdorfer Sporthalle" id="43d623e3">...</venue> <sets> <set> <song name="Babel"/> <song name="I Will Wait"/> <song name="Below My Feet"/> <song name="White Blank Page"/> <song name="Holland Road"/> <song name="Timshel"/> <song name="Little Lion Man"/> <song name="Lover of the Light"/> <song name="Broken Crown"/> <song name="Ghosts That We Knew"/> <song name="Awake My Soul"/> <song name="Roll Away Your Stone"/> <song name="Dust Bowl Dance"/> </set> <set encore="1"> <song name="Sigh No More"/> <song name="The Cave"/> <song name="The Weight">...</song> </set> </sets>\[/code\]The final purpose is to save the songs from the two sets.My class Setlist has a field called 'set':\[code\]@property (nonatomic, strong) Set *set;\[/code\]and the class Set has the field 'songs':\[code\]@property (nonatomic, strong) NSMutableArray *songs;\[/code\]I don't know what kind of relationship/structure I should create, so if someone could give me an approach, I would appreciate it.Thanks!
 
Top