有几个与此标题类似的问题,询问有关将 TouchXML 与 HTML Tidy 结合使用的问题。但几乎所有人都想问如何设置 Tidy。
我的尝试是想问(如果你允许的话:D)我到底如何用 TouchXML 解析 HTML。
那么
我应该只将 XHTML 交给 TouchXML 进行解析吗?
-
TouchXML 能否使用 Tidy 自动将 HTML 转换为 XHTML?如何做到这一点?
-
我应该使用CXHTMLDocument来构造docNode吗?
-
我搜索了很多关于 HTML 和 HTML 的页面。 TouchXML,但对于如何准确地做到这一点似乎没有什么真正有用的。我还找到了一个关于 TouchXML 的教程页面,但它是针对 XML 的。我还发现人们正在谈论在 TouchXML 中为 HTML 打开一些开关,您能告诉我更多关于在哪里以及如何进行这些开关的信息吗?
抱歉,请原谅我是新手。我完全迷路了。
谢谢
There are several questions with similar titles as this one, asking about using TouchXML with HTML Tidy. But almost all of them were trying to ask how to set up Tidy.
Mine is trying to ask (if you allow me :D) how exactly I can parse HTML with TouchXML.
So
-
Should I only give XHTML to TouchXML for parsing?
-
Can TouchXML automatically convert HTML to XHTML, using Tidy? How to do it?
-
Should I use CXHTMLDocument to construct the docNode?
-
I searched lots of pages about HTML & TouchXML, but it seems nothing is really useful for how to exactly do it. I also found a tutorial page about TouchXML, but it is for XML. I also found people are talking about turning on some switch in TouchXML for HTML, could you please tell me more about where and how to do those switches?
Sorry, please forgive me being newbie. I just got totally lost.
Thanks
发布评论
评论(1)
要在 HTML Tidy “nofollow">Touch XML,请确保在首次包含 CTidy.h 之前在您的项目中定义
TOUCHXMLUSETIDY
。由于 Touch XML 框架中的某些代码选择,您的定义不能为空。所以像这样:// not
这应该可以解决您遇到的链接问题。当我有时间时,我将扩展这个答案以包含更多有用的信息。
To enable HTML Tidy in Touch XML, make sure to define
TOUCHXMLUSETIDY
in your project, before the first include of CTidy.h. Due to some code choices in the Touch XML framework your define cannot be empty. So something like this:// not
That should fix the linking problem you had. I will expand this answer to include more useful information when I get some time.