简体   繁体   中英

Multiple NSXML Parser Issue

I am trying to parse two different XML files that are hosted on a server in an iPhone app. I have moved the parser from the AppDelegate to each of the ViewControllers but am having issues where none of my data is appearing parsed into the two tableViews. Each ViewController has a tableView; one to parse a file called "Articles", the other to parse a file "Headlines". I was able to successfully parse data when the nsxmlparser was initialized in the appDelegate, but now that I have split it apart and created two parsers, each in the viewControllers, my data is not parsing properly.

Things to check

  • All values are properly initialized
  • Input is there(check the network is returning your xml data as input to the parser)
  • Verify there parsing happens
  • Check the errors in parsing any misspelled tags and all
  • Check the output inside the parsing loop get correctly populated

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM