N
NSString *tmp;
NSArray *lines;
lines=[[NSString stringWithContentsOfFile :@"testFileReadLines.txt"]
componentsSeparatedByStr ing:@"\n"];
NSEnumerator *nse = [lines objectEnumerator];
//
读取
<>
里的内容
while(tmp = [nse nextObject]) {
NSString*stringBetweenBrackets = nil;
NSScanner*scanner = [NSScanner scannerWithString:tmp];
[scannerscanUpToString:@"<" intoString:nil];
[scannerscanString:@"<" intoString:nil];
[scannerscanUpToString:@">"intoString:&stringBetweenBrackets];
NSLog([stringBetweenBracketsdescription]);
}
NSArray *lines;