iPhone HTML Parsing using TouchXML and tidy

主宰稳场 提交于 2020-01-01 22:41:30

问题


I'm trying to parse HTML using TouchXML. However, it seems that the data I want to parse (I do not control the source, it's downloaded from the internet) is partially malformed - I get various errors during the parse. Therefore, it seems that I should be using the inbuilt tidy support to fix the HTML but I cannot seem to find any documentation or information on how to enable it or link libtidy successfully into my project.

If anyone has any information on how to do this, it'd be much appreciated. Alternatively if there's another tool I could be using to do this - do tell me!


回答1:


Actually, you can both link to the framework and include the headers, without needing to download the source.

  • Link to the existing framework libtidy.dylib
  • Add /usr/include/tidy to HEADER_SEARCH_PATHS



回答2:


Turns out that although the framework can be linked in to an xcode project, the headers are missing. I have got around this by downloading the HTML Tidy Source (src and include directory) and added them in to compile as part of my xcode project.



来源:https://stackoverflow.com/questions/4258333/iphone-html-parsing-using-touchxml-and-tidy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!