Link to home
Start Free TrialLog in
Avatar of yossikally
yossikally

asked on

I have a CComPtr<IWebBrowser2> m_pWB2, how can I enumerate all the document elements?

In my DOWNLOADCOMPLETE event I want to enumerate all ATML tags, and, say, see their InnerHTML content.

How do I get this done starting with my IWebBrowser2 * ?
Avatar of LordOfPorts
LordOfPorts
Flag of United States of America image

The thread at https://www.experts-exchange.com/questions/20194736/Looking-for-a-simple-IWebBrowser2-sample.html provides a sample that might be exactly what you are looking for.

Looking at the description of the DownloadComplete http://msdn.microsoft.com/en-us/library/aa768331%28VS.85%29.aspx event it states that it fires when a navigation operation finishes, is halted, or fails which might give you trouble when you try to traverse the document especially if the latter two cases occur. Perhaps NavigateComplete or NavigateComplete2 might be better events.
ASKER CERTIFIED SOLUTION
Avatar of LordOfPorts
LordOfPorts
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial