Use something like the Html Agility Pack , which can load your html into a DOM object that can be accessed, for example, to xpath requests.
If your html is actually not xhtml, it is usually not a valid xml structure with the right opening and ending node tags.
source
share