After struggling with writing a suitable html parser, I began to feel uncomfortable that I was solving a problem that had already been solved by someone, more than once, on the internet. So rather than giving in to "Not Invented Here" syndrome, I discovered HtmlAgility which seems a nice compromise between a lashed-together home-brew solution and an HtmlTidy root-and-branch linting.