Thursday, June 17, 2010

NSScanner

If you want to pull data from xml then use NSScanner :)



NSString *a =serverOutput2;// ur string
NSString *checkForValidity;


NSScanner *scanner = [NSScanner scannerWithString:a];

[scanner scanUpToString:@"" intoString:NULL];// write the word u want to scan in @
[scanner scanString:@"" intoString:NULL];
[scanner scanUpToString:@"
" intoString:&checkForValidity];
NSLog(@"%@",checkForValidity);

No comments:

FEEDJIT Live