Appy Html Agility Pack Changes to Web Page
See the question and my original answer on StackOverflowThe process for modifying a document is something like this:
HtmlDocument doc = new HtmlDocument();
doc.Load("somefile.html");
// modify doc in memory
doc.Save("somefile.html");