[webkit-dev] Qt DOM tree

Habiba Boulefat h.boulefaat at gmail.com
Sun Jun 1 08:42:38 PDT 2008


Hello,
I am developping an application that construct the DOM tree of a web page.
When the load of the page ends, I construct its DOM tree .
There is portion of my code:

v.load(url)
.....
 QString frameText = v . page() -> mainFrame() -> toHtml();

//here i am using tidy to correct the page and make it valid .I would like
that Instead of writing the name of file (-asxml webpage.html) work
directely with The variable frameText
 QProcess::startDetached ("tidy -o test.xml -asxml webpage.html");


QFile file ("test.xml");
  if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
         return;
  QTextStream out(&file);
  QString output = out.readAll();

  QDomDocument doc;
  doc.setContent(output);
  Arbre_DOM(doc . documentElement(), 1, 0);

please can any one help me because I don't know how work with tidy.
Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20080601/770228ed/attachment.htm 


More information about the webkit-dev mailing list