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

Popular posts from this blog

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

iphone - Using nested NSDictionary with Picker -

javascript - Iterate over array and calculate average values of array-parts -