问题
I'm parsing an xml which has data inbetween the tags like "S |nºconta|".I'm saving this as follows
-(void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string {
foundText = (NSMutableString *)[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
}
Where foundText is NSString. But i'm not getting the complete data as "S |nºconta|" instead i'm getting just "nºconta|" where "S |" characters are removed.
This is the xmlversion: "". S |nºconta|. "Details" is the tag name.Whenever "Details" is encountered i'm taking this to NSMutableString *foundText as given above and adding this back to NSMutableArray.But when it encounters S |nºconta| foundText will have only "nºconta|" leaving "|S"
来源:https://stackoverflow.com/questions/21950788/not-getting-proper-string-from-xml-parsing