i know this is totally against everything that is good and holy in web development but i need a way to input a string of html that has inline and <style> styles and convert it to tags such as <i> <u> etc. let me explain
im converting legislation in which they get rid of certain things in the bill text. when they do this they dont remove the text they apply a style with a strike through. when they add something it is underlined. and when they clear up something they make it bold. thats not the problem though.
the problem is that they don’t use consistent styles across the board. so one bold item might be .style-3 and another that is exactly the same might be .style-46757, its a huge pain in the ass. i need something that will take the markup and convert the attributes of the elements to html so that i can then replace those items with my own styles that are consistent. does anyone know of a library or script out there that does this? ive googled the shit out of it and no luck
here is an example of what i want.
FROM THIS
TO THIS
<span><b>Some text<span><u>some more text</u></span></b></span>thanks