Given a sample.xml like below
Using RatupreXML parsing, how can i get a name of each tag .. I did tried
Result shown on the console is
Any idea how to achieve tagName item1 and item2 . Please advice me. Thanks
Code:
<myXML>
<item1> this is my item1 </item1>
<item2> this is my item2 </item2>
</myXML>
Code:
RXMLElement *tmp = [RXMLElement elementFromXMLFile:@"sample.xml"];
NSArray *arr = [tmp child:nil];
for ( id obj in arr )
NSLog(@" obj in arr is %@ ", (NSString*)obj );
Code:
obj in arr is this is my item1
obj in arr is this is my item2