I am needing to parse an XML file for my app and I dont have any clue how to do it. I went through one XMLParser tutorial, and it worked fine but the XML file in the tutoria
I suggest you to read the Event-Driven XML Programming Guide for Cocoa. In your specific case, what you need to do is:
UPDATED
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict {
if ( [elementName isEqualToString:@"airport_name"]) {
if (!airports)
airports = [[NSMutableArray alloc] init];
NSString *str_icao_ident = [attributeDict objectForKey:@"icao_ident"];
//do something
return;
// ... continued ...
}}