I am creating a C# application in order to get the DOM info of a Web Page.
I cannot extract a TBODY tag using my application.
I am using
-
the control WebBrowser shipped by Visual Studio
-
a reference to the Com Microsoft.mshtml 7.0.3300.0
If I use the Internet Explorer Developer Toolbar ) I can see all information I need.
The tag has id=”tbody_id” and carries a list of tags full of data
that are showed in attributes innertHTML and innertText.
Using the code below innertHtml and innertText are both null.
What I am doing wrong?
There are other controls that I can use
mshtml.IHTMLDocument3 domDoc = this.webBrowser.Document.DomDocument as mshtml.IHTMLDocument3;
mshtml.IHTMLElement element = domDoc.getElementById("tbody_id");
String innerHtml = element.innerHTML;
String innerText = element.innerText;
I have been working on similar – the only thing you might try is to an implicit cast.
I am doing similar and have no trouble with getElementby
Hope this helps
Roger