tags:

views:

654

answers:

1

// ResxmlParser is globally declared as NSXMLParser

-(void)parsingXML:(NSString *)resXml {

NSData *xmlNsData =[resXml dataUsingEncoding:NSASCIIStringEncoding];

 ResxmlParser = [[NSXMLParser alloc] initWithData:xmlNsData ];

 [ResxmlParser setDelegate: self];
 [ResxmlParser setShouldResolveExternalEntities: YES];
 [ResxmlParser parse] ;

}

-(void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string {

//NSLog(@"-----------%@",string);

}

//------------------------------------------------------------------------------------

this is working fine in iPhone sdk 2.2 and lower version , but it is not working on sdk 3.0..

any body can help me to solve this problem.. ?

thanks and regards ...

jaleel

/------------------------------------------------------------------------------------

A: 

xml parser in 3.0 is much more sensitive. it fails if can't find closing tag. for example, it won't work if you have several <br>s in your code, but will work if you change all <br>s to <br />s

dieworld