Вам потребуется объект NSURLConnection и объект NSXMLParser. Я уверен, что вы уже знаете это.
допустим, у вас где-то есть NSString * tempString.
Для NSXMLParser вот методы, которые вы должны реализовать:
// When the start of an element is found
- (void) parser:(NSXMLParser *)parser
didStartElement:(NSString *)elementName
namespaceURI:(NSString *)namespaceURI
qualifiedName:(NSString *)qName
attributes:(NSDictionary *)attributeDict
{
if([elementName isEqualToString:@"password"])
{
// initialize your string
tempString = [NSString alloc] init];
}
}
// When the text in an element is found
- (void) parser:(NSXMLParser *) parser
foundCharacters:(NSString *)string
{
// use the value of the string(password) to initialize your string
tempString = string;
}
// When the end of element is found
- (void) parser:(NSXMLParser *) parser
didEndElement:(NSString *)elementName
namespaceURI:(NSString *)namespaceURI
qualifiedName:(NSString *)qName
{
// whatever work left to do with the xml parsing
// use know you get the password string, so do whatever you want after that
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Got the password!"
message:@""
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
}