开发者

XML Parsing need help iphone sdk

开发者 https://www.devze.com 2023-01-02 00:26 出处:网络
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>

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消