Assuming 'array' contains only one element, then 's' will contain the string of interest:
NSArray *array = [self.xmlDocument nodesForXPath:@"/xdxf/ar" error:&error];
if([array count] > 0) {
NSArray *childrenOfAr = [array[0] children];
for(NSXMLNode *n in childrenOfAr) {
if([n kind] == NSXMLTextKind) {
NSString *s = [n stringValue];
}
}
}
A faster way is to look for text() in the Xpath query:
NSArray *array = [self.xmlDocument nodesForXPath:@"/xdxf/ar/text()" error:&error];
if([array count] > 0) {
NSString *s = [array[0] stringValue];
}