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

apply tidy directly for the page loaded Without saving

From: hiba hussain <hiba117_37@hotmail.com>
Date: Wed, 4 Jun 2008 08:33:30 +0000
Message-ID: <BAY120-W46526B8FE362B8D40E1B56A1B50@phx.gbl>
To: <html-tidy@w3.org>

I have developped an apllication with Qt4 for construction a tree DOM of HTML page 

I'am using webkit library to load the html page like this:
 (   QString frameText = page.mainFrame()->toHtml();)  

But if the page is not
 a valid HTML one (i.e. Some missing closings tags), DOM construction fails
 It turned out the necessity to find a mean to validate the web page. For that purpose, i used
but to use tidy to validate the html page, i saved it in my disc before use tidy like this:
 QFile file("page.html");
               if (!file.open(QIODevice::WriteOnly | QIODevice::Text))

           QTextStream out(&file);
           out << frameText;

process->execute("tidy -f err.txt  -o page.xml -asxml  page.html"); // apply  tidy

My problème is:
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()");

Can any one help me to do this ?? is it possible with tidy??

Sur Windows Live Ideas, découvrez en exclusivité de nouveaux services en ligne... si nouveaux qu'ils ne sont pas encore sortis officiellement sur le marché !
Received on Wednesday, 4 June 2008 13:26:24 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:57 UTC