IPAD xml parsing with attributes deal

后端 未结 1 972
礼貌的吻别
礼貌的吻别 2021-01-28 10:24
 
…
…
…
 
…
…
…
 
…
…
…

This is my xml file, I\'m no

相关标签:
1条回答
  • 2021-01-28 10:52

    You should have a look at parser:didStartElement:namespaceURI:qualifiedName:attributes:. The names are then in the attributes dictionary.

    Edit:

    If the following doesn't help you, you should read some introduction stuff.

    - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict {
        if ([[attributeDict objectForKey: @"name"] isEqualToString: @"Local"]) {
            NSLog(@"found category with name Local");
        }
    }
    
    0 讨论(0)
提交回复
热议问题