NSLog(@"Status: %@", [[[xmlElement elementsForName:@"status"] objectAtIndex:0] stringValue]);
NSString *val = [[[xmlElement elementsForName:@"status"] objectAtIndex:0] stringValue];
NSLog(@"Status: %@", val);
the log shows
2011-07-02 16:06:45.014 Revistero[949:207] Status: error
2011-07-02 16:06:45.014 Revistero[949:207] Status: error
However this doesn’t work
if (val == @”error”)
Any suggestion?
%sis the format specifier for plain old C strings.NSStrings are Objective C objects, you can use the%@format specifier to log them.