<mgns1:message>
<mgns1:subject>Message Subject</mgns1:subject>
<mgns1:body>Message Body with a line break and special characters.

		!"'§$%&/()=?<>;:,.-_+*#@€</mgns1:body>
</mgns1:message>
After restkit's xml parser created the corresponding NSManagedObject the string looks like this:
Message Body with a line break and special characters.!"'§$%&/()=?<>;:,.-_+*#@€
--
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
{
// Build the text value
//[textInProgress appendString:[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]]; // original code line
[textInProgress appendString:string];
}
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
{
// Update the parent dict with text info
NSMutableDictionary *dictInProgress = [dictionaryStack lastObject];
// Pop the current dict
[dictionaryStack removeLastObject];
NSMutableString *newString = [[NSMutableString alloc] initWithString:[textInProgress stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]];
[textInProgress release];
textInProgress = newString;
// Set the text property
if ([textInProgress length] > 0)
{
if ([dictInProgress count] > 0)
{
[dictInProgress setObject:textInProgress forKey:kXMLReaderTextNodeKey];
}
else
{
// Given that there will only ever be a single value in this dictionary, let's replace the dictionary with a simple string.
NSMutableDictionary *parentDict = [dictionaryStack lastObject];
id parentObject = [parentDict objectForKey:elementName];
// Parent is an Array
if ([parentObject isKindOfClass:[NSArray class]])
{
[parentObject removeLastObject];
[parentObject addObject:textInProgress];
}
// Parent is a Dictionary
else
{
[parentDict removeObjectForKey:elementName];
[parentDict setObject:textInProgress forKey:elementName];
}
}
// Reset the text
[textInProgress release];
textInProgress = [[NSMutableString alloc] init];
}
}