0

I am looking for help on:

How I can get only valid HTML from a given "htmlContent" as String object?

Example....my htmlContent looks like....

<p>   some.   
         <b> some text</b>  
         text
</p>

</span>
</strong>
</p>

As you can see I have the last three orphan html tags which must go away and return value would only looks like:

<p>   some.   
         <b> some text</b>  
         text
</p>

Is there a way I get my expected result as stated above?

I am dealing with huge sized and so many html docs that has such issues and I need to clean this up.

Your help is greatly appreciated.

Shah
  • 1

0 Answers0