views:

541

answers:

1

Ive used WindowsHost to host a WebBrowser control, and that has allowed me to access the WebBrowsers Document/DOM directly, t read HTML content via mouse clicks on HTML document elements and also to invokes on submit forms. I never found a way even in Net 3.5 to do this when I was searching at the time. Ive found this post http://rhizohm.net/irhetoric/blog/72/default.aspx and it looks like through som magic casing you can expose the dom. BUT My question is, has any one done this, and is it possible once you get the dom to do Invokes to submit contect to html forms and also get HTML elements via mouse click events????

Anyone tried? and was able to do both?

Thanks

A: 

I'm using WPF.

add a reference to:

Microsoft.mshtml

then: var doc = ( mshtml.HTMLDocument )_wbOne.Document;

and this gives you the raw string:

        doc.documentElement.innerHTML

in return, if you know how to get information out of the HTML document, i'd appreciate it. for example get all the s and and the metas and whatever else might be gettable so i can get the information from them? i don't want to dink around with the html, just get the info from them...:-)