The Microsoft WebBrowser control is a managed shell for the Microsoft COM web browser, as I understand it. So, under the hood, this is the same rendering and implementation of the DOM that IE uses that is called MSHTML. Because it does not support XPath against its HTML DOM, it does not support the "evaluation" method (which is part of the W3C DOM Level 3 XPath). I donβt see a way to fulfill XPath requests regarding an HTML document loaded into a Microsoft WebBrowser control. Are there any third-party .NET web browser controls based on other browsers that support XPath against HTML DOM, I donβt know.
If you want to use .NET to run XPath on an HTML document, then the HTML flexibility package . However, this does not depend on the WebBrowser control, so you cannot use it to navigate the HTML document loaded in the WebBrowser control, instead you will work with a separate implementation.
Martin honnen
source share