W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2008

Re: apply tidy directly for the page loaded Without saving

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Wed, 04 Jun 2008 15:35:48 +0200
To: hiba hussain <hiba117_37@hotmail.com>
Cc: <html-tidy@w3.org>
Message-ID: <ka6d449c26dahrrh5p45u9iauf0e2a5q8b@hive.bjoern.hoehrmann.de>

* 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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:59 GMT