I have a XML WebService (and no chance to change this) elements can be empty but I see no obvious way to do this using KissXML.
Is there a way to prevent app crashing if <thing>false</thing>
is <thing/>
?
I am using this code:
if ([[element elementsForName:@"thing"] count] > 0) {
id obj = [[element elementsForName:@"thing"] objectAtIndex:0];
if (obj) self.thing = [obj boolValue];
}