Xml mutablearray position of element

clone

New Member
Ho i have a xml parser in my app that get a nsmutable array from an xml\[code\] //creazione nome XML NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];NSString *nomeXML = [NSString stringWithFormat: @"%@_%@_%@",[defaults stringForKey:@"interesse"],[defaults stringForKey:@"provincia"],[defaults stringForKey:@"giorno"]]; NSLog(@"%@", nomeXML);//Caricamento XMLtable = [[NSMutableArray alloc] init]; NSString *url = [[NSBundle mainBundle] pathForResource:nomeXML ofType:@"xml"];XMLParser *myParser = [[[XMLParser alloc]autorelease] parseXMLAtURL:url toObject:@"Mercato" parseError:nil];for(int i = 0; i < [[myParser items] count]; i++) { Mercato *new = [[myParser items] objectAtIndex:i]; [table addObject:new];\[/code\]here an example of xml tag \[code\] .....<Mercato> <provincia>Brescia</provincia> <comune>ROVATO</comune> <perio>Settimanale</perio> <giorno>Luned
 
Back
Top