Thanks Jack,
Considering the original example:
- (void) viewDidLoad{
NSString *tempStr = nil;
NSString *filepath = [[NSBundle mainBundle] pathForResource:@"filename"
ofType:@"xml"];
NSData *xmlData = [NSData dataWithContentsOfFile:filepath];
NSMutableString *xqueryStr = [NSMutableString
stringWithFormat:@"/data/title/@number"];
NSArray *resultNodes = PerformXMLXPathQuery(xmlData, xqueryStr);
NSEnumerator *e = [resultNodes objectEnumerator];
id object;
while (object = [e nextObject]) {
for (NSString *key in object){
tempStr = [[object objectForKey:key]
stringByTrimmingCharactersInSet:[NSCharacterSet
whitespaceAndNewlineCharacterSet]];
if ([tempStr isEqualToString:@"number"] ) {
}else {
// do something here
}
}
}
}
if I use "resultNodes" within the scope of viewDidLoad, then there is no need
to retain "resultNodes"?
Thanks for all the help,
Phil
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]