任何人都可以解释一下,HTML Agility Pack的确切用法是什么? [英] Can Anybody Explain me , What is the Exact Use of the HTML Agility Pack?

查看:107
本文介绍了任何人都可以解释一下,HTML Agility Pack的确切用法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨大家。,,,



任何人都可以解释一下,HTML Agility Pack的确切用途是什么?我知道如何使用它,但我不知道为什么要使用它。



在此先感谢.......

Hi Guys.,,,

Can Anybody Explain me , What is the Exact Use of the HTML Agility Pack?. I know how to use it but i am not getting why to use.

Thanks In Advance.......

推荐答案

这是一个敏捷的HTML解析器,它构建一个读/写DOM并支持普通的XPATH或XSLT(你实际上不需要理解XPATH或XSLT来使用它,不要担心... )。它是一个.NET代码库,允许您解析out of the webHTML文件。解析器非常容忍真实世界格式错误的HTML。对象模型与提出System.Xml非常相似,但对于HTML文档(或流)。



Html Agility Pack现在支持Linq to Objects(通过LINQ to Xml Like界面)。查看新测试版以使用此功能



示例应用程序:



页面修复或生成。你可以按照你想要的方式修改页面,修改DOM,添加节点,复制节点......你可以命名它。



网络扫描仪。您可以使用一堆XPATH查询轻松访问img / src或/ hrefs。



网络刮刀。例如,您可以轻松地将任何现有网页废弃为RSS提要,只需将XSLT文件用作绑定。提供了一个例子。
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).

Html Agility Pack now supports Linq to Objects (via a LINQ to Xml Like interface). Check out the new beta to play with this feature

Sample applications:

Page fixing or generation. You can fix a page the way you want, modify the DOM, add nodes, copy nodes, well... you name it.

Web scanners. You can easily get to img/src or a/hrefs with a bunch XPATH queries.

Web scrapers. You can easily scrap any existing web page into an RSS feed for example, with just an XSLT file serving as the binding. An example of this is provided.


这篇关于任何人都可以解释一下,HTML Agility Pack的确切用法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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