XML Parsing need help iphone sdk
How do you get "MayurS123" from following xml tag by parsing?
<eletitle lnk="http://192.168.10.2/justmeans/trunk/newsfeed/mayurs">MayurS123 Sharma</eletitle>
My file is getting parsed properly. Here I'm able to retrieve the lnk component by doing:
if([elementName isEqualToString:@"eletitle"])
{
aGoodwork.lnk = [attributeDict objectForKey:@"lnk"];
}
But I'm not getting how to get in actual title.
Thanx 开发者_如何学Cin advance.
You have to implement this delegate method:
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
Look at any of the XML parsing examples Apple provides with the iPhone SDK and you'll find appropriate code samples.
精彩评论