Re: apply tidy directly for the page loaded Without saving

* hiba hussain wrote:
>I'am using webkit library to load the html page like this:
>But if the page is not a valid HTML one (i.e. Some missing
>closings tags), DOM construction fails

>I want to apply tidy directly for the page loaded with webpage (modules
>of webkit ) Without saving it on the disk like this: process->execute("tidy
> -f err.txt  -o page.xml -asxml  page.mainFrame()->toHtml()");

Tidy will read your document from STDIN and generate the ouput on STDOUT
by default, you just have to use whatever APIs appropriate on your plat-
form do use Tidy like this. Typically sections on inter-process communi-
cation, interaction with the shell, or console applications, or the STD-
IN/STDOUT keywords cover this. The alternative would be to include the
Tidy library into your program and use the Tidy API for the cleanup. Do
note though that you might be using WebKit incorrectly (e.g., you might
be trying to load XML content, while you should be loading HTML content,
WebKit includes a fault tolerant HTML processor already).
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Wednesday, 4 June 2008 13:36:26 UTC