I display List of date’s on my table view….
based on the date’s.. i need to search location. and title
“with the help of url“.
example
String *url=@”http://compliantbox.com/party_temperature/djsearch.php?date=?”
for the selected date.
i appended the date value to the string url.
So i need to parse again same xml parser. with date search.
<root>
<event title="event_title"location="new york"date="12/01/2011"/>
<event title="event_title2"location="california"date="13/01/2011"/>
<event title="event_title3"location="new york"date="14/01/2011"/>
</root>
here my array get’s Re-Initialization.
so i get conflict. when displaying data….
I need to not re-Initialization my array again. and again…
I need to initialize my array only once in entire application.
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName
namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName
attributes:(NSDictionary *)attributeDict{
if ([elementName isEqualToString:@"root"]){
dateListArray=[[NSMutableArray alloc] init];
}
}
I Hope you people understand my problem.
Please help me out .
@Thanks to All.
One way that you should trying here,
And other way you should also be trying,
above statement write down in
-(void)viewDidLoadevent andabove write down in your required function.