[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Parse html file without displaying
From:       Kevin Krammer <kevin.krammer () gmx ! at>
Date:       2005-08-30 20:08:07
Message-ID: 200508302208.13683.kevin.krammer () gmx ! at
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Tuesday 30 August 2005 20:41, Robert Hogan wrote:
> I want to read and parse an html file without displaying it. I'm trying:
>
>     KURL url = "http://www.kde.org";
>     KHTMLPart *filelist = new KHTMLPart();
>     filelist->openURL(url);
>     const DOM::HTMLCollection links = filelist->htmlDocument().links();
>
> without success.  can someone tell me what the first three lines should be?

The first three lines are ok, but you have to wait until KHTMLPart has 
finished loading the data before you can access the DOM tree.

Connect a slot to the part's completed() signal and access the DOM document 
there.

Cheers,
Kevin

-- 
Kevin Krammer <kevin.krammer@gmx.at>
Qt/KDE Developer, Debian User
Moderator: www.mrunix.de (German), www.qtforum.org

[Attachment #5 (application/pgp-signature)]

 =

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscrib=
e <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic