mmmdreg macrumors 65816 Original poster Apr 14, 2002 1,393 0 Sydney, Australia Dec 27, 2004 #1 I'm a total script kiddie when it comes to cocoa so I was wondering if someone can shove me in the right direction regarding parsing the iTunes xml file for data on all the songs so that I can use them for something else?
I'm a total script kiddie when it comes to cocoa so I was wondering if someone can shove me in the right direction regarding parsing the iTunes xml file for data on all the songs so that I can use them for something else?
mj_1903 macrumors 6502a Feb 3, 2003 563 0 Sydney, Australia Dec 27, 2004 #2 NSDictionary Location of the iTunes Music Library file is nearly always ~/Music/iTunes/iTunes Music Library.xml. To load this: [NSDictionary dictionaryWithContentsOfFile:[@"~/Music/iTunes/iTunes Music Library.xml" stringByExpandingTildeInPath]]; Open the xml file in property list editor to see the layout, but the main keys that you will want are "Tracks" and "Playlists".
NSDictionary Location of the iTunes Music Library file is nearly always ~/Music/iTunes/iTunes Music Library.xml. To load this: [NSDictionary dictionaryWithContentsOfFile:[@"~/Music/iTunes/iTunes Music Library.xml" stringByExpandingTildeInPath]]; Open the xml file in property list editor to see the layout, but the main keys that you will want are "Tracks" and "Playlists".
mmmdreg macrumors 65816 Original poster Apr 14, 2002 1,393 0 Sydney, Australia Dec 28, 2004 #3 hehe but how do I take those values out? =)
mj_1903 macrumors 6502a Feb 3, 2003 563 0 Sydney, Australia Dec 28, 2004 #4 mmmdreg said: hehe but how do I take those values out? =) Click to expand... Did you look in the documentation? It is quite obvious. Methods like: Code: - (id)objectForKey:(NSString *)aString for NSDictionary's or Code: - (id)objectAtIndex:(int)anIndex for NSArray's.
mmmdreg said: hehe but how do I take those values out? =) Click to expand... Did you look in the documentation? It is quite obvious. Methods like: Code: - (id)objectForKey:(NSString *)aString for NSDictionary's or Code: - (id)objectAtIndex:(int)anIndex for NSArray's.
S sicojola macrumors newbie Nov 24, 2005 1 0 Nov 24, 2005 #5 mj_1903 said: NSDictionary Location of the iTunes Music Library file is nearly always ~/Music/iTunes/iTunes Music Library.xml. To load this: [NSDictionary dictionaryWithContentsOfFile:[@"~/Music/iTunes/iTunes Music Library.xml" stringByExpandingTildeInPath]]; Click to expand... is there an easy way to do this using java instead of obj-c?
mj_1903 said: NSDictionary Location of the iTunes Music Library file is nearly always ~/Music/iTunes/iTunes Music Library.xml. To load this: [NSDictionary dictionaryWithContentsOfFile:[@"~/Music/iTunes/iTunes Music Library.xml" stringByExpandingTildeInPath]]; Click to expand... is there an easy way to do this using java instead of obj-c?
caveman_uk Guest Feb 17, 2003 2,390 1 Hitchin, Herts, UK Nov 24, 2005 #6 Using the now unsupported 'Java bridge'. Check the Apple documentation on using cocoa from java.
devman macrumors 65816 Apr 19, 2004 1,242 8 AU Nov 25, 2005 #7 sicojola said: is there an easy way to do this using java instead of obj-c? Click to expand... JAXP. http://java.sun.com/webservices/jaxp/index.jsp
sicojola said: is there an easy way to do this using java instead of obj-c? Click to expand... JAXP. http://java.sun.com/webservices/jaxp/index.jsp