Bill: htmlagilitypack,c# Practical HTML Parsing class introduction

Source: Internet
Author: User

Htmlagilitypack is an HTML parsing class library under. Net. Supports parsing HTML with XPath. The meaning is not small, why? Because of the XPath of the elements on the page, some powerful browsers can be obtained directly, and do not need to be written manually. Saving most of the time to write regular expressions, while regular expressions sometimes need to be written for further acquisition, but after XPath parsing, the regular expression already has a very small range to match. Also, there is no need for regular expressions to match the entire page source code, and the speed will be improved. All in all, through the library, the browser gets to the XPath to get the content of the node and then the regular expression to match to the required content, whether it is development speed, or operational efficiency has been improved.

Htmlattribute attributes of the corresponding HTML element

Htmlattributecollection A collection of attributes of an element, implements the Ilist

Htmlnode corresponding to HTML nodes, including annotations, text, elements, etc.

Htmlnodecollection a Htmlnode node collection, realizes the Htmlnodecollection:ilist

Htmlnodetype An enumeration that represents the type of node, document, comment, element, text.

Htmltextnode corresponds to an HTML text node, a very simple class that inherits from the Htmlnode.

Htmlentity entities that correspond to the entity utility class to replace special characters, and vice versa

Htmlparseerror represents a parsing error that the document found during parsing.

There are other classes that you can add to your later useful time.

  

: http://htmlagilitypack.codeplex.com/

Bill: htmlagilitypack,c# Practical HTML Parsing class introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.