[英]How can I read specific data from given html document in Data Table in c#?
Here is my html document of belarc advisor, I want to read some specific data from it like Operating System, Drives, Memory in Data Table. 这是我的belarc advisor的html文档,我想从中读取一些特定的数据,例如操作系统,驱动器,数据表中的内存。
Note: I have done such task like read excel files in data grid view. 注意:我已经完成了诸如在数据网格视图中读取Excel文件之类的任务。 But I am not aware about how can I read specific data from html document. 但是我不知道如何从html文档中读取特定数据。
So is it possible to read only specific data from html document? 那么有可能只从html文档中读取特定数据吗?
You might want to take a look at: https://html-agility-pack.net/?z=codeplex 您可能需要看看: https : //html-agility-pack.net/?z=codeplex
Also the default XmlDocument
class should be able to parse the HTML. 默认的XmlDocument
类也应该能够解析HTML。
Or regular expressions are an option: http://mahmoud-alam.blogspot.com/2008/02/some-times-we-need-to-extract.html 或选择使用正则表达式: http : //mahmoud-alam.blogspot.com/2008/02/some-times-we-need-to-extract.html
What that means is you have to load the page and then look for the datatable you would like to extract. 这意味着您必须加载页面,然后查找要提取的数据表。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.