I have some strings that are a sequence of html paragraphs:
<p style="text-align: justify;"><strong> strong text> <a href=\"skhf\">alink</a></p>
<p> another par </p>
I want to change paragraph and link style, so adding/removing attributes. Moreover I’d like to remove some paragraphs also, according to their content.
I guess I have first to convert this string in an xml structure and then revert it back to string right? Any ideas?
You can do this with
yourString.replace(oldChar, newChar)if there are not many changes