HTML snippet analysis

What is the best way to parse HTML snippets in C #?

In context, I inherited an application that uses a lot of composite controls, which is good, but many controls are displayed using a long literal sequence, which is pretty awful. I am trying to get the application into unit tests, and I want these controls to pass tests to find out if they generate well-formed HTML code and to check this HTML code in a dream solution.

+3
source share
4 answers

If HTML is XHTML compliant, you can use the built-in System.Xml namespace.

+1
source

HTMLAgility pack. .NET XmlDocument, HTML, / XHTML.

+3

SGMLReader, XML- HTML, , XPath XSLT..

+1

HTML Tidy / HTML. , .NET, IKVM java-.

-1

Source: https://habr.com/ru/post/1698918/


All Articles