开发者

CXMLDocument parser

开发者 https://www.devze.com 2022-12-12 04:51 出处:网络
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

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

精彩评论

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