Howto get source code of displayed IE-pages?

Hi!
Is there any API to get the source code (i.e. the html)
of the page currently shown inside an Internet Explorer
window?

I want to do a kind of logging of all displayed pages.
If such an API existed, i could poll and save the changes
to disk. I want to do this with win32ole if possible.

Thanks for any help ion advance!
Martin.

Is there any API to get the source code (i.e. the html)
of the page currently shown inside an Internet Explorer
window?

I want to do a kind of logging of all displayed pages.
If such an API existed, i could poll and save the changes
to disk. I want to do this with win32ole if possible.

AFAIK, the API is the COM interface, which requires win32ole, of course.

Pretty much any element in the DOM have an outerHTML and innerHTML
property - if you get at the top of the DOM, you should get the html for the
whole page.

rnetexplorer.asp

nt.asp

Chris
http://clabs.org/blog

Perhaps (untested) ie.document.rootElement.outerHTML (I think that’s the
right DOM syntax)

···

Martin Kahlert (mkcon@gmx.de) wrote:

Hi!
Is there any API to get the source code (i.e. the html)
of the page currently shown inside an Internet Explorer
window?

I want to do a kind of logging of all displayed pages.
If such an API existed, i could poll and save the changes
to disk. I want to do this with win32ole if possible.

Thanks for any help ion advance!
Martin.


Eric Hodel - drbrain@segment7.net - http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04