i have this xml file \[code\]<?xml version="1.0" encoding="UTF-8"?><table8><wireSize size="14-AWG"><wirematerial wmaterial ="Cooper"> <conduitmaterial cmaterial ="PVC"> <wireresitance>3.1</wireresitance> </conduitmaterial> <conduitmaterial cmaterial ="Aluminum"> <wireresitance>3.1</wireresitance> </conduitmaterial> <conduitmaterial cmaterial ="Steel"> <wireresitance>3.1</wireresitance> </conduitmaterial></wirematerial><wirematerial wmaterial ="Aluminum"> <conduitmaterial cmaterial ="PVC"> <wireresitance>0.0</wireresitance> </conduitmaterial> <conduitmaterial cmaterial ="Aluminum"> <wireresitance>0.0</wireresitance> </conduitmaterial> <conduitmaterial cmaterial ="Steel"> <wireresitance>0.0</wireresitance> </conduitmaterial></wirematerial></wireSize><wireSize size="12-AWG"><wirematerial wmaterial ="Cooper"> <conduitmaterial cmaterial ="PVC"> <wireresitance>2.0</wireresitance> </conduitmaterial> <conduitmaterial cmaterial ="Aluminum"> <wireresitance>2.0</wireresitance> </conduitmaterial> <conduitmaterial cmaterial ="Steel"> <wireresitance>2.0</wireresitance> </conduitmaterial></wirematerial><wirematerial wmaterial ="Aluminum"> <conduitmaterial cmaterial ="PVC"> <wireresitance>3.2</wireresitance> </conduitmaterial> <conduitmaterial cmaterial ="Aluminum">\[/code\]and i need to get the value of wireresitance if size = 12-AWG, wmaterial = Cooper and cmaterial = PVCi have been using this code but no success \[code\]- (void)doneUIButton *)sender\[/code\]{ for (int i = 0; i <= numberOfBranch - 1; i++) {\[code\]double tempVoltage = 0;double temVd = 0; NSString *temp = [NSString stringWithFormat"%@ %@ %s %@ %s %@ %s", @"//wireSize[@size='", [wireSizeArray objectAtIndex:i], "']/wirematerial[@wmaterial='", [materialArray objectAtIndex:i], "']/conduitmaterial[@cmaterial='", conduitType, "']"]; //NSString *trimmed = [temp stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; NSLog(@"temp: %@", [wireSizeArray objectAtIndex:i]); NSArray *currencyList = [self getAllItems:temp fileName"table_9.xml"]; int numberOfCurrencies = [currencyList count]; NSString *name, *symbol; if (numberOfCurrencies > 0) { for (int i = 0; i < numberOfCurrencies; i++) { name = [[currencyList objectAtIndex:i] objectForKey"wirematerial"]; //symbol = [[currencyList objectAtIndex:i] objectForKey"wirematerial"]; //NSLog(@"name: %@, currency: %@", name, symbol); NSLog(@"name: %@", name); } }} VdropResult *helpView = [[VdropResult alloc] initWithNibName"VdropResult" bundle:[NSBundle mainBundle]]; self.vDropresult = helpView; [helpView release]; [self.navigationController pushViewController:self.vDropresult animated:YES];\[/code\]}\[code\]- (NSMutableArray *)getAllItemsNSString *)xpath fileNameNSString *)file{NSMutableArray *res = [[NSMutableArray alloc] init];NSString *XMLPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:file];NSData *XMLData = http://stackoverflow.com/questions/14410932/[NSData dataWithContentsOfFile:XMLPath];CXMLDocument *doc = [[[CXMLDocument alloc] initWithData:XMLData options:0 error:nil] autorelease];NSArray *nodes = NULL;nodes = [doc nodesForXPath:xpath error:nil];for (CXMLElement *node in nodes) { NSMutableDictionary *item = [[NSMutableDictionary alloc] init]; int counter; for(counter = 0; counter < [node childCount]; counter++) { //ignore whitespcae NSString * value = [[[node childAtIndex:counter] stringValue] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; if ([value length] != 0) // common procedure: dictionary with keys/values from XML node [item setObject:[[node childAtIndex:counter] stringValue] forKey:[[node childAtIndex:counter] name]]; } [res addObject:item]; [item release];}return res;\[/code\]}