title: nsxmlparser problem
body: <p>I have been battling this issue for a few days now and think I have located the problem...</p>
  
  <p>I am using an ASIHTTPRequest method to connect to my php script that calls requests data from the database, from there I initiate the NSXMLParser delegates everything seems to work fine, I can even NSLog the results as they get parsed however it seems that when I try to put these results into a NSMutableArray the results dont seem to want to go into it.. I keep getting null values..</p>
  
  <p>I am hoping someone can give me a reason why or if you can point me in a direction to finally get this problem solved because its becoming a real pain in the behind..</p>
  
  <p>This is my parsing process </p>
  
  <pre><code>- (IBAction)setRequestString:(NSString *)string
  {
      //set up address
      NSMutableString *databaseURL = [[NSMutableString alloc] initWithString:@"http://127.0.0.1:8888/CodeTest/"];
      [databaseURL appendString:string];
      //call delegates
      NSURL *url = [NSURL URLWithString:databaseURL]; //LIVE mode
      ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
      [request setDelegate:self];
      [request startAsynchronous];
  }
  
  - (void)requestFinished:(ASIHTTPRequest *)request
  {     
      NSString *responseString = [request responseString]; //Pass request text from server over to NSString 
      NSData *capturedResponseData = [responseString dataUsingEncoding:NSUTF8StringEncoding]; 
      NSLog(@"%@", responseString);
      [self startTheParsingProcess:capturedResponseData];
  }
  
  - (void)requestFailed:(ASIHTTPRequest *)request
  {
      NSError *error = [request error];
      NSLog(@"%@", error);
  }
  
  
  
  
  
  #pragma mark - Parsing lifecycle
  //--- Start parsing process using NSXMLParser ----------------&gt;&gt;
  - (void)startTheParsingProcess:(NSData *)parserData
  {
      NSXMLParser *parser = [[NSXMLParser alloc] initWithData:parserData]; //incoming parserDatapassed to NSXMLParser delegate which starts parsing process 
  
      [parser setDelegate:self];
      [parser parse]; //Starts the event-driven parsing operation.
      [parser release];
  
      [self.tableView reloadData];
  
  }
  
  - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict
  {
      if ([elementName isEqual:@"item"]) {
          // NSLog(@"Found title!");
          itemString = [[NSMutableString alloc] init];
      }
  }
  
  - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
  {
      [itemString appendString:string];
  }
  
  - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
  {
      if ([elementName isEqual:@"item"]) {
          //NSLog(@"ended title: %@", itemString);
          [myDataArray addObject:itemString];
          NSLog(@"%@", itemString);
          NSLog(@"%@", myDataArray);
  
          //TODO: Test release on memory consumption etc
          [itemString release];
          itemString = nil;
      }
  }
  //--- Finish parsing process using NSXMLParser ----------------&gt;&gt;
  </code></pre>
  
  <p>Which prints this</p>
  
  <pre><code>2011-09-08 08:46:24.424 iCode[1209:207] &lt;?xml version="1.0"?&gt;
  &lt;entries&gt;
          &lt;item&gt;Honda&lt;/item&gt;
          &lt;item&gt;Nissan&lt;/item&gt;
          &lt;item&gt;Mitsubishi&lt;/item&gt;
          &lt;item&gt;Toyota&lt;/item&gt;
          &lt;item&gt;Mazda&lt;/item&gt;
  &lt;/entries&gt;
  2011-09-08 08:46:24.426 iCode[1209:207] Honda
  2011-09-08 08:46:24.426 iCode[1209:207] (null)
  2011-09-08 08:46:24.427 iCode[1209:207] Nissan
  2011-09-08 08:46:24.427 iCode[1209:207] (null)
  2011-09-08 08:46:24.428 iCode[1209:207] Mitsubishi
  2011-09-08 08:46:24.428 iCode[1209:207] (null)
  2011-09-08 08:46:24.430 iCode[1209:207] Toyota
  2011-09-08 08:46:24.431 iCode[1209:207] (null)
  2011-09-08 08:46:24.431 iCode[1209:207] Mazda
  2011-09-08 08:46:24.432 iCode[1209:207] (null)
  </code></pre>