What is the easiest way, without using regex, to trim empty text elements and line breaks from a html string using c# ?
When I say trim I mean from the start and end of the html
example
input:
<br /><br /><p></p><h1>Title</h1><p></p><br /><p>paragraph</p><p></p><p></p><br />
output:
<h1>Title</h1><p></p><br/><p>paragraph</p>
` empty but `` is not? – Datz Oct 30 '18 at 11:31