I have long XML strings that I hardcode into the unit tests of the iPhone project.
This is pretty ugly to avoid all quotes and line breaks - for example:
NSString *xml =
@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\
<root>\
<element name=\"foo\" />\
</root>";
It would be nice to have a lower friction method.
I know that Ruby has great syntax for multi-line literals ... any suggestions for Objective-C?
Hugh source
share