2011-02-09 39 views

回答

0

您应该检查文档为NSXMLParserDeleagte:

- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict 

attributeDict - 是你所需要的东西。例如,对于标签:

<weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0"> 

attributeDict将包含6个键:模块id,tab_id,mobile_row,mobile_zipped,行,用适当的值部分。