How do I format the html source code (I have my html code in string format) for readability using C#?I have to give alignment and spacing using code (indent for all child html elements) as similar to Visual studio.
My input:"<html><head></head><body><div><div>sample</div></div></body></html>"
Output should be:"
<html>
<head></head>
<body>
<div>
<div>
sample
</div>
</div>
</body>
</html>"