Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't copy mutable array value into string
    primarykey
    data
    text
    <p>i really appreciate for immediate reply and i submit my xml parser methods to you and at last problem is mention.</p> <pre><code>- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict { currentElement = [elementName copy]; if([elementName isEqualToString:@"alluser"]) { objUser = [[Users alloc] init]; } } -(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if([elementName isEqualToString:@"username"]) { objUser.userName =[currentElementValue stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; NSLog(@"%@",objUser.userName); } if([elementName isEqualToString:@"password"]) { objUser.passWord = [currentElementValue stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; NSLog(@"%@",objUser.passWord); } if([elementName isEqualToString:@"user"]) { [usersArray addObject:objUser]; [objUser release]; } } - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { if(!currentElementValue) { currentElementValue = [[NSMutableString alloc] initWithString:string]; [currentElementValue stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; } else { [currentElementValue appendString:string]; [currentElementValue stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; } if([currentElementValue isEqualToString:@"User"]) { [currentuser appendString:string]; } if([currentElementValue isEqualToString:@"Pass"]) { [currentpass appendString:string]; } } -(IBAction)backgroundclick:(id)sender { [txtpass resignFirstResponder]; [txtusername resignFirstResponder]; } -(IBAction)returnPressed:(id)sender { [sender resignFirstResponder]; } -(IBAction)LoginClicked:(id)sender { int cnt=0; NSString *currUser = txtusername.text; // NSString *passWord = txtpass.text; // int i=0; for(Users *objUser in usersArray ) { /// how to get value and how to compare string... } return; } </code></pre> <p>my mutable array is in this code is (usersArray). i got parse data into the array and i want to check username and password with textfields value if it match with array the certain action is performed. but somehow i cant access data into the string.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload