HTML is not XML.
If your input was valid XHTML, then you could parse it as XML.
Since the input
isn't XHTML, you cannot parse it as XML. You need to use an HTML parser like
AngleSharp[
^] or
Html Agility Pack[
^].
It's not clear whether either of these would work in a SQLCLR project. If not, you'll have to move your HTML processing into your .NET code.