Question

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

  1. Should I only give XHTML to TouchXML for parsing?

  2. Can TouchXML automatically convert HTML to XHTML, using Tidy? How to do it?

  3. Should I use CXHTMLDocument to construct the docNode?

  4. 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

Was it helpful?

Solution

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:

#define TOUCHXMLUSETIDY TRUE

// not

#define TOUCHXMLUSETIDY

That should fix the linking problem you had. I will expand this answer to include more useful information when I get some time.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top