Using TouchXML with HTML Tidy

扶醉桌前 提交于 2020-01-07 05:32:04

问题


I am trying to set up TouchXML in my iPhone app to parse HTML from a website, but unfortunately the website's HTML isn't valid XML. I'd like to use HTML tidy to tidy it up, and in fact TouchXML has a setting, TOUCHXMLUSETIDY, which when turned on in fact does this. But when I turn on this setting, I get the following errors: Tidy.h: No such file or directory found. I have libtidy.dylib installed in my target, and tried downloading the HTML Tidy source and putting it directly into my app, but nothing is working. Any suggestions for how to tidy up HTML into valid XML on the iPhone?


回答1:


Tidy.h is found in /usr/include/tidy add that to your User Header Search Paths in xcode as well as add -ltidy to your Other Linker Flags. You should be all set.




回答2:


Did you download the TouchXML? Then you should add the files in /TouchXML/Externals/tidy/src to your project. That's the tidy!



来源:https://stackoverflow.com/questions/5336406/using-touchxml-with-html-tidy

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