문제

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?

도움이 되었습니까?

해결책

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"];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top