.NET component
DOM of Html document - HTML Parser
Collection of Rules - CSS Parser

Html Parser .NET

• File formats: HTML, HTML, XML format.
• Stylesheets: CSS Parser.
• 100% managed .NET component.
• Royalty-Free. No extra cost for Server license.
• 6 Months: Free Support + Free Updates.
Evaluation Version
Download  |   Online Demo
Developer License - $59
Buy now  |   Price List

Skip Navigation Links

Html Parser .NET component




Learning Resources




News & Releases

May 13, 2016
Version 2.1 Update
Html Parser .NET component
December 15, 2015
Version 2.1 Update
Html Parser .NET component
April 12, 2013
Version 2.1 Update
Html Parser .NET component
January 06, 2013
Version 2.1 Update
Html Parser .NET component
October 10, 2012
Version 2.1 Update
Html Parser .NET component
July 19, 2012
Version 2.1 Update
Html Parser .NET component
June 01, 2012
Version 2.1 Update
Html Parser .NET component

Html Tag and Attributes

"I tried your component to parse the HTML file. It works fine for scanning html files. But I still have a few questions. How can I find a certain tag by its name? Also I want to know how can I retreive attributes of some tag?"
Jerry Kreischer

The Html Parser has several methods to help user in seeking of html tag with specified name. The one is if you know that the tag is placed in certain HtmlNodeCollection:

  1. // Parse the html and build DOM tree
  2. HtmlDoc html = HtmlDoc.ParseHTML(htmltext);
  3.  
  4. // Get BODY html tag
  5. HtmlTag body = html.Nodes["body"];

The other way to find a tag is to use FindByName() function. This function will search though the collection of nodes and subnodes for all elements with the specified name. The search is guaranteed to return nodes in the order in which they are found in the document.

  1. // Find STRONG tag
  2. HtmlNodeCollection taglist = html.Nodes.FindByName("strong");
  3. HtmlTag bold = taglist[0] as HtmlTag;

Html Parser has class for collection of attributes HtmlAttributeCollection. Typically, this is associated with a particular tag via Attributes property. This collection is searchable by both the index and the name of the attribute.

  1. // Getting attributes of the tag
  2. HtmlNodeCollection reflist = html.Nodes.FindByName("a");
  3. HtmlTag link = reflist[0] as HtmlTag;
  4. string urladdress = link.Attributes["href"].Value;