HtmlDocument is an instance of a document that is already loaded by the WebBrowser control. So there is no ctor.
The Html Agility Pack is the best library I've used for this purpose.
Codeplex wiki example
HtmlDocument doc = new HtmlDocument(); doc.Load("file.htm"); foreach(HtmlNode link in doc.DocumentElement.SelectNodes("//a[@href]")) { HtmlAttribute att = link["href"]; att.Value = FixLink(att); } doc.Save("file.htm");
This example shows how to load a file, but there are overloads that allow you to load a string or stream.
Sky sanders
source share