I\'ve got another newbie question.
I\'ve written a piece of code that converts a NSString to NSMutableData in order to simulate a webService result.
It turns out
NSData
object using the +dataWithBytes:length:
method.const char *rawBytes = [testXMLDataString UTF8String];
const NSUInteger length = [testXMLDataString lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
NSAssert(length > 0, @"Couldn't convert to UTF-8");
NSMutableData *testXMLData = [NSMutableData dataWithBytes:rawBytes length:length];
[webData setData:testXMLData];