So, basically I want to make objects "Songs" from iTunes Library.xml The problem is that XML-file looks more like .plist Here is an example:
<key>56</key>
<dict>
<key>Track ID</key><integer>56</integer>
<key>Name</key><string>apple-ipad-video</string>
<key>Kind</key><string>QuickTime Movie</string>
<key>Size</key><integer>99552974</integer>
<key>Total Time</key><integer>440607</integer>
<key>Date Modified</key><date>2010-05-13T19:55:21Z</date>
<key>Date Added</key><date>2010-07-22T05:40:11Z</date>
<key>Bit Rate</key><integer>123</integer>
<key>Artwork Count</key><integer>1</integer>
<key>Persistent ID</key><string>EEC08DC8DE950DF9</string>
<key>Track Type</key><string>File</string>
<key>Has Video</key><true/>
<key>HD</key><false/>
<key>Video Width</key><integer>848</integer>
<key>Video Height</key><integer>480</integer>
<key>Movie</key><true/>
<key>Location</key><string>file://localhost/Users/User/Music/iTunes1/iTunes%20Media/Movies/apple-ipad-video-geo-alt1-ru-20100406_848x480/apple-ipad-video-geo-alt1-ru-20100406_848x480.mov</string>
<key>File Folder Count</key><integer>4</integer>
<key>Library Folder Count</key><integer>1</integer>
</dict>
<key>58</key>
How can I parse it when all the elements are same? I need object in output that looks something like this:
@interface Song : NSObject {
NSInteger *trackID;
NSString *name;
NSString *kind;
NSInteger *size;
...
}
Anybody got ideas? Thanks in advance.