Cd ルームに関する Rss フィードを保存するために、このクラスを作成しました。
CdObject.h
@interface CdObject : NSObject{
NSString *title,*artist,*country,*company,*price,*year;
}
@property(nonatomic,retain)NSString *title,*artist,*country,*company,*price,*year;
CdObject.m
#import "CdObject.h"
@implementation CdObject
@synthesize title,artist,country,company,price,year;
@end
次に、xml を解析しながら、このクラスの新しいインスタンスを作成してプロパティ (タイトル、アーティストなど) を入力し、それらを NSMutableArray (cdListArray) にプッシュします。
cdListArray 内からこれらのオブジェクトの 1 つのプロパティを読み取るにはどうすればよいですか?
Ex:NSLog(@"%@",[cdListArray objectAtIndex:0].title) ???