Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : Re: TWebBrowser - Parsing HTML Then Display

www.cryer.info
Managed Newsgroup Archive

Re: TWebBrowser - Parsing HTML Then Display

Subject:Re: TWebBrowser - Parsing HTML Then Display
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Sat, 10 Jun 2006 13:56:34

"Anthoni Gardner" <nonono@nono.com> wrote in message
news:448ad605$1@newsgroups.borland.com...

> I have the Extended IEParser V2 component, and I can in fact
> use this to parse said document, but then it leaves me with a
> IHTMLDocument2 interface. I know the TWebBrowser has
> this interface, but how do I then get it to read my parsed and
> altered IHTMLDocument2 ?

You can't pass it directly.  You would have to extract the altered HTML from
it, and then pass the HTML to the WebBrowser.  You have two options for
that:

1) query both interfaces for the IPersistStreamInit interface.  Assuming
that IEParser's IHTMLDocument2 implements that interface, then you could
call IEPArser's IPersistStreamInit::Save() to store the altered HTML into an
IStream, and then pass that to the WebBrowser's IPersistStreamInit::Load()
method.

2) save the altered HTML to a temporary file, and then have the WebBrowser
Navigate() to that file.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive