I am doing XMLParsing for my app. To get the parsed value in dictionary i have used XMLReader.h
and XMLReader.m
file. It works for all web services but returns null
. It gives me correct response in XML format.
Here is the code where I get the values in dictionary
-(void)parser:(NSXMLParser *) parser foundCharacters:(NSString *)string
{
if(elementFound)
{
[soapResults appendString:string];
NSLog(@"soap result of hotel is %@",soapResults);
NSError *parseError = nil;
NSDictionary *xmlDixtionary = [XMLReader dictionaryForXMLString:soapResults error:&parseError];
NSLog(@"dictionary is is %@",xmlDixtionary);
}
}
But the log gives me a null
value , what should I do to get the values in dictionary?