Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy Web Page Source from Internet Explorer Programmatic
Message
De
10/09/2007 15:17:10
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01253446
Message ID:
01253521
Vues:
19
This message has been marked as a message which has helped to the initial question of the thread.
>This does a Select All of the current webpage and then Copies that into my clipboard. This works great but I also want to pull the HTML source under the "View" -> "Source" menu, but I can't figure out how to do this programmatically. I looked at the available commands on MSDN but don't see one for that.

IE does rewrite HTML a bit to something MS seems think of as better HTML - it is NOT the original source. Cetin's way will get you the origininal HTML, which you can from IE only by tricking it: ask for IPersistFile or IPersistStream-Interfaces on the .document and call the methods of that interface: it gets unaltered HTML. The beautified HTML (which I think view source shows, haven't tested for a long time) can be reached through a number of ways via the DOM as Dragan mentioned. IE>5 supports IHTML3 interfaces, there should be a method on DocumentElement to get it all or get the inner/outerHTML of the root element...

Object browser is your friend...

HTH

thomas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform