I'm actually working on a personal project in C# using WPF and WPF WebBrowser. I really need to explore html DOM Elements as we used to do in javascript or php..etc
In my MainWindow I have this variable :
private mshtml.HTMLDocument mainDocument = new mshtml.HTMLDocument();
In my webBrowser LoadComplete callback I have this :
mainDocument = (mshtml.HTMLDocument) mainBrowser.Document;
Ok, so this is nice, it's working.
Now if I do this :
mshtml.IHTMLElement elem = mainDocument.getElementById("MY_ID");
it's also very nice, can do elem.innerHTML or somes stuff like that.
BUT my problem is only HTMLDocument have methodes to find elements by ID, by tagnames..etc
I don't know how to find elements in IHTMLElement. I tried some stuff like casting IHTMLElement to IHTMLElement2..etc but nothing have worked.
Please if you have any ideas. A lot of people talks about hosting winforms webbrowser but I think it must have a way to do that only with mshtml.
Thanks a lot, If you need more information, please feel free to ask me
ps : I'm french so I'm sorry about my Engish skills