Tag Archives: XmlDocument

Using Parallel LINQ in C#

The snippets below illustrate Parallel LINQ in C# by crawling a web page in parallel. The Crawler class is responsible for crawling a web page (only one level deep) and returning a list of documents. The Document class represents an HTML document.

Posted in C# | Also tagged , , , , , , , , , | Leave a comment

Parsing (X)HTML into a DOM tree in C#

As a quick alternative to the Html Agility Pack, HTML can be parsed into a DOM tree using the built-in XmlDocument class. The following snippets illustrate HTML parsing in C#.

Posted in C# | Also tagged , , , , , , , , , | Leave a comment