mshtml.IHTMLElement element = dom.getElementById("rootElement");
foreach (mshtml.IHTMLElement child in element.children)
{
//do my stuff
}
[.net] c# problems with mshtml.IHTMLElement
hi, i've got a custom WebBrowser control, and I need to do some work with the dom.
I need access to the children of an element, but I don't really know what type they are or how to get access to them..the intellisense only tells me they are objects
^^that doesn't work, as there is no getenumerator, I can't cast it into an array of mshtml.IHTMLElement[]...I'm unsure of what to do with this.
Any help?
What is the runtime type when you set a breakpoint and examine the element.children property at runtime?
children = {System.__ComObject}
maybe this is simple, but this com marshalling stuff is a little over my head...or i'm missing something pretty key to grasp it.
maybe this is simple, but this com marshalling stuff is a little over my head...or i'm missing something pretty key to grasp it.
Where did you get the custom webbrowser control?
Obviously it is using some COM component. When you know what component that is (probably IE) you should be able to look up its SDK/help.
EDIT:
IHTMLElement is an interface of IE (see this)
By googling I found this it might help you to understand the API
Obviously it is using some COM component. When you know what component that is (probably IE) you should be able to look up its SDK/help.
EDIT:
IHTMLElement is an interface of IE (see this)
By googling I found this it might help you to understand the API
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement