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.
Asked
Active
Viewed 254 times
0
-
what is the issue... what do require here, if u have the data then display in UILabel, after receiving.. – vishy Jan 30 '12 at 08:32
-
i have mylabel.text = [data_from_xml attributeForName=@"attribute"]; and it don't works – trigger_88 Jan 30 '12 at 08:42
1 Answers
1
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;

vishy
- 3,241
- 1
- 20
- 25