|
|
#1 |
|
XML Parsing help please
hi all ,
I am following an xml parsing example from this link http://www.iphonesdkarticles.com/2008/11/parsing-xml-files.html - iPhone SDK Articles to parse my own xml file which is in this format.... Code:
Quote: <?xml version="1.0" encoding="UTF-8" ?> - <Root> - <CourseBeansList> - <CourseBean> <LearningId>COURSE_1</LearningId> <LearningType>Online</LearningType> <Title>AAO - Anatomy of the Ear</Title> <Description>Sample AAO course used for LMS Shootout at Online Learning Conference, 2002 in Anaheim, CA</Description> <CatalogList>Default Public CatalogOtolaryngology</CatalogList> </CourseBean> Quote: Code:
-(void)parser: (NSXMLParser *)parser didStartElementNSString *)elementName
namespaceURINSString *)namespaceURI qualifiedName: (NSString *)qualifiedName
attributes: (NSDictionary *)attributeDict {
if([elementName isEqualToString:@"Courselist"]) {
//initialize the array.
appDelegate.CourseBeansList = [[NSMutableArray alloc] init];
}
else if([elementName isEqualToString:@"Courselist"]) {
//initialize the book
aCourselist = [[Courselist alloc] init];
//extract the attribute here.
aCourselist.CourseBean = [[attributeDict objectForKey:@"id"] integerValue];
NSLog(@"Reading id value :%i", aCourselist.CourseBean);
}
NSLog(@"Processing Element: %@", elementName);
}
|
|
|
|
0
|
|
|
#2 |
|
First of all the
Code:
else if([elementName isEqualToString:@"Courselist"]) Second, 'Courselist' is not even an element name given that sample XML file. Did you mean 'CourseBeansList'?
__________________
|
|
|
|
0
|
|
|
#3 |
|
program terminating due to uncaught exception
any one could please resolve my problem in this project. you can download my project from the link http://uploading.com/files/1faafca6/XML.zip/
please help me.. all i need to do is parse the xml |
|
|
|
0
|
|
|
#4 |
|
Did you address the issues I brought up in my first post?
__________________
|
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| Parsing XML file - Please help!! | tssav | iPhone/iPad Programming | 4 | Dec 8, 2010 04:22 PM |
| how to get data, HTML tags in XML file, while xml parsing | psudheer28 | iPhone/iPad Programming | 5 | Aug 26, 2010 12:50 PM |
| How to edit XML parsed data and save on iPhone app | Amit Jain | iPhone/iPad Programming | 1 | Jan 13, 2009 01:46 AM |
| Regarding XML parsing | MalathiV | iPhone/iPad Programming | 4 | Dec 4, 2008 09:39 PM |
| pls help me in xml parsing | vavdiyaharesh | iPhone/iPad Programming | 0 | Nov 16, 2008 04:48 AM |
All times are GMT -5. The time now is 10:36 PM.






I support the 
Linear Mode

