ios - IPAD xml parsing with attributes deal -
<category name="local"> … … … <category name="business"> … … … <category name="politics"> … … …
this xml file, i'm not sure how deal attribute using nsxmlparser. question how deal above attributes in nsxmlparser. please me. in advance.
you should have @ parser:didstartelement:namespaceuri:qualifiedname:attributes:. names in attributes dictionary.
edit:
if following doesn't you, should read 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 name local"); } }
Comments
Post a Comment