我在我的表視圖顯示日期的名單....
基於日期的..我要搜索的位置。和標題
「藉助於網址」。
示例 String * url = @「http://compliantbox.com/party_temperature/djsearch.php?date=?」
所選日期。
我將日期值附加到字符串url。
所以我需要再解析相同的XML解析器。與日期搜索。
<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>
這裏我的數組得到了重新初始化。
所以我得到衝突。當顯示數據....
我需要不重新初始化我的數組了。並再次... 我需要在整個應用程序中初始化我的數組一次。
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName
namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName
attributes:(NSDictionary *)attributeDict{
if ([elementName isEqualToString:@"root"]){
dateListArray=[[NSMutableArray alloc] init];
}
}
我希望你們瞭解我的問題。 請幫我一把。
@謝謝大家。你應該在這裏試圖
這是你做了完美的.....讓我來試試。 – 2011-01-10 06:21:00