[Qt-interest] Parsing a HTML document with non-supported html subsets

Castagne Nicolas nicolascastagne at yahoo.fr
Tue Jul 21 09:54:55 CEST 2009


Hi all and thanks Frank.

> Do you mean ?
> QString text=file->readAll();
> Browser->setHtml(text)

Indeed, no.

My problem is that I have a html string containg a table with cells with specific attributes, such as:
***********************
  <tr height=13>
   <td class=xl24 align=right width=75 x:num="1.23456789012346E28">1,23E+28</td>
 </tr>
************************

in which I need to retrieve the x:num attribute value in the <td> tag.


Unfortunately, calls such as:
    Browser->setHtml(text)
removes some attributes that are present in text, ie:
    Browser->toHtml()
then returns a string without the x:num attribute.

Hence : how should I parse my html string ?
Is there a **hack** with QTextDocument that would allow me to ?

Hope it is clearer.
Best-
Nicolas


--- En date de : Lun 20.7.09, Frank Lutz <frank422542 at googlemail.com> a écrit :

De: Frank Lutz <frank422542 at googlemail.com>
Objet: Re: [Qt-interest] Parsing a HTML document with non-supported html subsets
À: qt-interest at trolltech.com
Date: Lundi 20 Juillet 2009, 16h53

Do you mean ?

------
QString text=file->readAll();
        
Browser->setHtml(text)
--------

greetings!
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090721/3f0c7309/attachment.html 


More information about the Qt-interest-old mailing list