Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS NSXML字典未添加到数组_Ios_Xml_Parsing_Nsmutablearray_Nsxml - Fatal编程技术网

iOS NSXML字典未添加到数组

iOS NSXML字典未添加到数组,ios,xml,parsing,nsmutablearray,nsxml,Ios,Xml,Parsing,Nsmutablearray,Nsxml,我有一个NSXML解析器的实例,它解析一些xml并将其存储在一个对象数组中。XML有一些图像URL和标题,我试图将它们添加到字典中,然后将字典添加到数据对象中的数组中。字典设置正确,但不会添加到数组中。以下是xml和代码: XML: 代码: fcpressrease.h @interface FCPressRelease : NSObject @property (strong, nonatomic) NSString *pubDate; @property (strong, nonatomi

我有一个NSXML解析器的实例,它解析一些xml并将其存储在一个对象数组中。XML有一些图像URL和标题,我试图将它们添加到字典中,然后将字典添加到数据对象中的数组中。字典设置正确,但不会添加到数组中。以下是xml和代码:

XML:

代码:

fcpressrease.h

@interface FCPressRelease : NSObject

@property (strong, nonatomic) NSString *pubDate;
@property (strong, nonatomic) NSString *title;
@property (strong, nonatomic) NSString *summary;
@property (strong, nonatomic) NSString *guid;
@property (strong, nonatomic) NSMutableArray *images;

@end
fcpressrease.m

@implementation FCPressRelease

@synthesize pubDate = _pubDate;
@synthesize title = _title;
@synthesize summary = _summary;
@synthesize guid = _guid;
@synthesize images = _images;

@end

您应该使用init方法完成FCPressRelease的初始化过程


currentPressRelease=[FCPressRelease alloc]init]

媒体是你所说的字典吗?如果是,请告诉我当前PressRelease中对象图像的类型。图像?图像是一个NSMutableArray。我正在尝试将字典添加到数组中,这样我就有了一个字典图像url/标题数组。您能否提供FCPressRelease类的源代码?图像的@property属性是什么?
@implementation FCPressRelease

@synthesize pubDate = _pubDate;
@synthesize title = _title;
@synthesize summary = _summary;
@synthesize guid = _guid;
@synthesize images = _images;

@end