views:

211

answers:

2

Hi,

I tried to find some ressources for creating an XML parser with a searchBar. Any Idea?

Thanks a lot

A: 

That's a pretty generic question. You're likely to get alot more answers by asking something more specific about what you want to accomplish. Developers are more about implementation than design. Perhaps you can rephrase your question in that context? I'm sure you have a few ideas on your mind. Why not share them?

Rob Segal
A: 

Thanks for your advice. I have a tableview with an uisearchbar filled with an xml file. The code above show it with NSURL but i cant do it with parseXMLFileAtURL.

I found a good tutorial (in french) to parse XML file but i cant add to it a searchbar. Id like to find a tutorial mixing xml parsing and searchbar.

Thank you

NSURL *url = [NSURL URLWithString:@"http://www.....fr/file.xml"];
NSArray *gamesToLiveInArray = [NSArray arrayWithContentsOfURL:url];
NSLog(@"%@", [gamesToLiveInArray description] );


NSDictionary *gamesToLiveInDict = [NSDictionary dictionaryWithObject:gamesToLiveInArray forKey:@"title"];

[listOfItems addObject:gamesToLiveInDict];

//copy du tableau
copyListOfItems = [[NSMutableArray alloc] init];

//titre
self.navigationItem.title = @"Recherche";

//ajoute la searchbar
self.tableView.tableHeaderView = searchBar;
searchBar.autocorrectionType = UITextAutocorrectionTypeNo;

searching = NO;
letUserSelectRow = YES;
This is what you want to end up with correct?http://www.iphonesdkarticles.com/2009/01/uitableview-searching-table-view.htmlThat tutorial seems pretty complete and I think will get you what you want in the end although I did not go through it extensively.
Rob Segal