I have tried parsing a locally stored .css file using the below given code but it gives error
The error is as given below
Whats wrong with the code snipet? Is there any other way to parse the .css file on iphone?
Thanks
Arnieterm
Code:
NSString* strFilePath = [ [ NSBundle mainBundle] pathForResource:@"stylesheet" ofType:@"css"];
NSData* data = [ [ NSData alloc] initWithContentsOfFile:strFilePath];
NSString* string;
NSDictionary *dictionary;
string = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding];
dictionary = [string propertyList];
[string release];
The error is as given below
Code:
NSParseErrorException', reason: 'XML parser error:
Unexpected character . at line 1
Old-style plist parser error:
Unexpected ';' or '=' after key at line 2
Thanks
Arnieterm