tag-manipulation

server-side css selectors

I am creating a tool that will check dynamically generated XHTML and validate it against expected contents. I need to confirm the structure is correct and that specific attributes exist/match. There may be other attributes which I'm not interested in, so a direct string comparison is not suitable. One way of validating this is with XPa...

I need a php regular expression that replaces one tag with another

Here is what I need to be able to do: I need to match the following tag: <SPAN style="TEXT-DECORATION: underline">text sample</SPAN> I need to replace the span with an html3 compliant tag, but keep the text in between. The final tag should look like this after replacement: <u>text sample</u> I'm just not good with regular express...