Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CXMLDocument *document = [[[CXMLDocument alloc] initWithXMLString:responseString options:0 error:nil] autorelease];
- NSArray *nodes = [document nodesForXPath:@"//data" error:nil];
- for (CXMLElement *xmlElement in nodes) {
- NSLog(@"XML: %@", xmlElement);
- NSString *value = [[[xmlElement elementsForName:@"status"] objectAtIndex:0] stringValue];
- if (value == @"error")
- {
- UIAlertView *errorAlert = [[UIAlertView alloc] initWithTitle:@"Error"
- message:@"Los datos ingresados no coinciden"
- delegate:nil
- cancelButtonTitle:@"OK"
- otherButtonTitles:nil];
- [errorAlert show];
- [errorAlert release];
- }
- else {
- NSLog(@"Status: %s", value);
- }
- }
Add Comment
Please, Sign In to add comment