Skip to content

Commit

Permalink
Problem is Issues link: amarcadet#15
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeYZ committed Jan 17, 2016
1 parent be2246c commit f881c5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion XMLReader.m
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName names
{
// trim after concatenating
NSString *trimmedString = [self.textInProgress stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
[dictInProgress setObject:[trimmedString mutableCopy] forKey:kXMLReaderTextNodeKey];
if (!([dictInProgress.allKeys containsObject:kXMLReaderTextNodeKey] && [trimmedString isEqualToString:@""])) {
[dictInProgress setObject:[trimmedString mutableCopy] forKey:kXMLReaderTextNodeKey];
}

// Reset the text
self.textInProgress = [[NSMutableString alloc] init];
Expand Down

0 comments on commit f881c5e

Please sign in to comment.