NSScanner Unresolved Infinite loop. Help.
NSScanner Unresolved Infinite loop. Help.
- Subject: NSScanner Unresolved Infinite loop. Help.
- From: email@hidden
- Date: Sun, 9 Jun 2002 20:30:25 -0400
Hi,
I'm porting my app from Rb to cocoa.
I'm writing an app that fetches XML and displays specific ...
I use NSScanner to parse stuff in the XML file.
What i need it the strings between the <title> markers.
What I did is.
<CODE>
NSLog(@"Read response.");
// Scan the goodies out of the whole file.
RDFScanner = [NSScanner scannerWithString:responseString];
while ([RDFScanner isAtEnd] ==
NO) { //
STOPS EXECUTING HERE.
if ([RDFScanner scanString:@"<title>" intoString:NULL] &&
[RDFScanner scanUpToString: @"</title>"
intoString:&titleData] ){
[headlinesArray addObject:titleData];
NSLog(@"Got Headline #%d",[headlinesArray count]);
}
}
</CODE>
Just email me if you want the whole PBPROJ.
I really need help :D
-Jean-Olivier Lancttt-David
--------------------------------------------------------------------
Creator of PodNews, a popular utility for your iPod
http://ambush.avara.net/podnews
--------------------------------------------------------------------
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.