Question

I am using restkit and I have problems parsing an xml:

Unable to find parser for MIME Type 'text/xml charset=utf-8'
Encountered unexpected response with status code: 200 (MIME Type: text/xml charset=utf-8)

Isn't it supported?

Was it helpful?

Solution

If you can't modify the server just register the mimetype with XML parser in RKParserRegistry:

[[RKParserRegistry sharedRegistry] setParserClass:[[[RKParserRegistry sharedRegistry] parserForMIMEType:RKMIMETypeXML] class] 
                                      forMIMEType:@"text/xml charset=utf-8"];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top