views:

111

answers:

2

Is there a way to parse xml file that is encoded with windows-1254 with using NSXMLParser? When i try, didStartElement method not called.

A: 

I removed the <?xml version="1.0" encoding="windows-1254" ?> part from xml data and then i send it to xmlParser, so there is no problem anymore.

crazywood
A: 

Don't forget if parse() returns NO you can check parseError to see what happened:

if ([parser parse] == NO)
{
   NSError *error = [parser parserError];
   NSString *readableMessage = [error localizedDescription];
   NSLog(@"Error occurred: %@\n", readableMessage);
}
Epsilon Prime
Thank you for your advice, i implemented it, but i think there is a missing character at "[parser parseError]", it must be "[parser parserError]".
crazywood
Right you are -- fixed.
Epsilon Prime