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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -