Using MSHTML to modify HTML Elements
Posted on 2006-04-22
My application composes an HTML page at run time using content pulled from the net. Once composed, it is saved to file and displayed in aWeb Browser control.
Once displayed I need to add the (TARGET="_blank") atribute to all anchor tags. I am using MSHTML as follows:
private void wbUserRSS_NavigateComplete2(object sender, AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event e)
// Force all links in the document to open external windows
htmlDocument = (mshtml.HTMLDocument) this.wbUserRSS.Document;
// How to access all the <A> elements in the document?
Also, are there any good articles out there explaining possibilities with MSHTML in an easy way (unlike the MSDN documentation)?