简体   繁体   English

多个NSXML分析器问题

[英]Multiple NSXML Parser Issue

I am trying to parse two different XML files that are hosted on a server in an iPhone app. 我正在尝试解析iPhone应用程序的服务器上托管的两个不同的XML文件。 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. 我已经将解析器从AppDelegate移到了每个ViewController,但是遇到了问题,即我的数据都没有解析到两个tableViews中。 Each ViewController has a tableView; 每个ViewController都有一个tableView; one to parse a file called "Articles", the other to parse a file "Headlines". 一个解析一个名为“ Articles”的文件,另一个解析一个“ 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. 当在appDelegate中初始化nsxmlparser时,我能够成功解析数据,但是现在我将其拆分并创建了两个解析器,每个解析器都在viewControllers中,我的数据无法正确解析。

Things to check 检查事项

  • All values are properly initialized 所有值均已正确初始化
  • Input is there(check the network is returning your xml data as input to the parser) 输入在那里(检查网络是否将您的xml数据作为输入返回到解析器)
  • Verify there parsing happens 验证是否发生解析
  • Check the errors in parsing any misspelled tags and all 检查解析所有拼写错误的标记以及所有标记时的错误
  • Check the output inside the parsing loop get correctly populated 检查解析循环中的输出是否正确填充

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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