开发者

CXMLDocument parser

I am using CXMLDocument parser to parse an xml file in iphone... Its work great for me...

But i dont know how i parse the attribute name of the CXMLElement ? my sample xml is here

<thumbnail url="http://www.samplewebservice/image.gif"/>

<rating value="3" max="5"/>

<vie开发者_如何学Cws value="1654"/>

I want to get url,value and max values from the xml file....

Can anyone help me ?

Thanks in advance


Use (resultElement is CXMLElement):

[resultElement attributeForName:@"url"] stringValue];
[resultElement attributeForName:@"value"] stringValue];
[resultElement attributeForName:@"max"] stringValue];

I hope this will help.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜