什么是C#来解析HTML的最佳方式? [英] What is the best way to parse html in C#?

查看:443
本文介绍了什么是C#来解析HTML的最佳方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在找一个库/方法来解析HTML文件比一般的XML解析库更多的HTML特定功能。

I'm looking for a library/method to parse an html file with more html specific features than generic xml parsing libraries.

推荐答案

的Html敏捷性包

这是一个灵活的HTML解析器,建立一个读/写DOM,并支持简单的XPath或XSLT(你其实并不需要了解XPATH也不XSLT使用它,不要担心...)。这是一个.NET code库,使您解析出了网络的HTML文件。解析器很宽容与现实世界恶意的HTML。对象模型是非常相似,提出的System.Xml,但对于HTML文档(或流)。

This is an agile HTML parser that builds a read/write DOM and supports plain XPATH or XSLT (you actually don't HAVE to understand XPATH nor XSLT to use it, don't worry...). It is a .NET code library that allows you to parse "out of the web" HTML files. The parser is very tolerant with "real world" malformed HTML. The object model is very similar to what proposes System.Xml, but for HTML documents (or streams).

这篇关于什么是C#来解析HTML的最佳方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆