HtmlDocument class library provides you with the DOM (Document Object Model) for the HTML documents. The same way the XmlDocument class provides the DOM for the XML documents the HtmlDocument does that for HTML documents.
HtmlDocument library provides the light-weight high-performance HTML Document Object Model engine.
HTMLDocument is 100% native .NET framework managed component written in C#.
HTML is not well-formed format like XML, so there are lot of complexities that are involved in trying to provide consistent in memory, tree-like Object representation. Most of the pages on the Internet are not well formed thus not suitable for parsing with the XML objects provided by .Net framework.
HtmlDocument library will also create the XmlDocument from current HTML DOM so you can use full power provided by XmlDocument class directly on your HTML.
Comments