Display result of parse XML in UIViewController, GDataXML

262 views Asked by At

i parsed a XML with GDataXML but now i need display the result in a UILabel, i'm working with a UIViewController. Thanks in advance.

1

There are 1 answers

0
vishy On BEST ANSWER

First check wether u r getting the exact data as per requirement..

we have the methods to retrieve the value:

- (NSString*) stringValueForAttribute: (NSString*)attributeName;
- (BOOL) boolValueForAttribute: (NSString*)attributeName;
- (NSInteger) integerValueForAttribute: (NSString*)attributeName;

get the corresponding value in a string, as

NSString* str = [data_from_xml stringValueForAttribute:@"attribute"];

print the value for cross check

NSlog(@"%@", str);

then display on label

mylabel.text = str;