Get all elements matching an XPath expression in a webbrowser document

时光总嘲笑我的痴心妄想 提交于 2020-01-04 08:06:11

问题


I have a WebBrowser in a .net Form, and I am looking for a way to get all the HTMLElements that match a given XPath expression.


回答1:


I suggest that instead of WebBrowser, use the HTML Agility Pack.

It lets you download documents from the web and supports XPath natively. I also deals well with badly formed HTML and HTML fragments.



来源:https://stackoverflow.com/questions/6431090/get-all-elements-matching-an-xpath-expression-in-a-webbrowser-document

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!