The best way is Tidy the html or xml code
http://fop-miniscribus.googlecode.co...dy/bestqtidy.h
class QTidy
qt4 compatible lib...
http://fop-miniscribus.googlecode.co.../modules/tidy/
after you can parse as xml and read/write all your own chunk html...
or if you search only image on html code to load.....
/* read remote image from html code */
void Load_Image_Connector()
{
///////////////////qDebug() << "### Load_Image_Connector";
QRegExp expression
( "src=[\"\'](.*)[\"\']", Qt
::CaseInsensitive );
expression.setMinimal(true);
int iPosition = 0;
int canna = 0;
while( (iPosition = expression.indexIn( html , iPosition )) != -1 ) {
QString semi1
= expression.
cap( 1 );
canna++;
dimage.append(semi1); /* image lista 1 */
AppendImage(semi1); /* register qmap images & name & replace qurl remove css file */
iPosition += expression.matchedLength();
////////////////////qDebug() << "### iPosition " << iPosition;
}
QTimer::singleShot(1,
this,
SLOT(GetRemoteFile
()));
}
/* read remote image from html code */
void Load_Image_Connector()
{
///////////////////qDebug() << "### Load_Image_Connector";
QRegExp expression( "src=[\"\'](.*)[\"\']", Qt::CaseInsensitive );
expression.setMinimal(true);
int iPosition = 0;
int canna = 0;
while( (iPosition = expression.indexIn( html , iPosition )) != -1 ) {
QString semi1 = expression.cap( 1 );
canna++;
dimage.append(semi1); /* image lista 1 */
AppendImage(semi1); /* register qmap images & name & replace qurl remove css file */
iPosition += expression.matchedLength();
////////////////////qDebug() << "### iPosition " << iPosition;
}
QTimer::singleShot(1, this, SLOT(GetRemoteFile()));
}
To copy to clipboard, switch view to plain text mode
Bookmarks