Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#import "NSXMLNode+StringForXPath.h"
@implementation NSXMLNode (StringForXPath)
- (NSString *) stringForXPath:(NSString*)xpath
NSError *error;
NSArray *nodes = [self nodesForXPath:xpath error:&error];
if (error || nodes.count == 0)
return nil;
return [[nodes objectAtIndex:0] stringValue];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.