Xml parsing is an integral part of any mobile project you will come across, 4 out of 5 projects are about parsing the xml and then using the data in one way or another.
xml's are also a great way of passing data between different platforms.
NSXMLParser is provided by the Foundation framework and is an event based parser (SAX ), though there are several free third party parsers available which perform better than NSXMLParser.
To get the xml file opened and read into the NSData variable we need to create the path to the xml file stored in the application.
It can be done as :
NSString *appDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"project_name.app/file_name.xml"];
Will post more when i'll experiment with a DOM parser in ios.
Regards,
Ishan
No comments:
Post a Comment