IE8 CSS Selectors in C#

  • Thread starter Thread starter Thomas Zapf-Schramm
  • Start date Start date
T

Thomas Zapf-Schramm

IE8 implements the W3C Selectors API. With this API javascript can
select elements from the DOM tree in a very comfortable way. With the
mshtml.dll the IElementSelector and IDocumentSelector interfaces make
functions querySelector() and querySelectorAll() accessible from C++ and
VisualBasic (VBA). But I can find no way to use them from C# or VB.NET.
After referencing the mshtml.tbl the Interfaces don't show up. Is there
solution to this problem?

Thomas
 
IE8 implements the W3C Selectors API. With this API javascript can
select elements from the DOM tree in a very comfortable way. With the
mshtml.dll the IElementSelector and IDocumentSelector interfaces make
functions querySelector() and querySelectorAll() accessible from C++ and
VisualBasic (VBA). But I can find no way to use them from C# or VB.NET.
After referencing the mshtml.tbl the Interfaces don't show up. Is there
solution to this problem?

Thomas

most probably because mshtml is not a COM but a native dll (although I
find this weird). What is what you want to do?
 
Ignacio said:
most probably because mshtml is not a COM but a native dll (although I
find this weird). What is what you want to do?

I'm trying to simplify a webscraping application.
So I have to figure out how do it with P/Invoke DLLImport :-(
 
Thomas said:
I'm trying to simplify a webscraping application.
So I have to figure out how do it with P/Invoke DLLImport :-(
I can't find out how to do this. Has anybody an idea or knows how to do it?
 
Thomas said:
I can't find out how to do this. Has anybody an idea or knows how to do it?
Finally it works! I had to create a new interop assembly from the IE8
mshtml.tlb with tlbimp.exe (from the WIN 6.0A SDK). Now C# sees the new
Interfaces.
 
Back
Top