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!