Possible Duplicate:
Removing unclosed opening <p>tags from xhtml document
I have a big xhtml Document consisting of lots of tags. I have observed that a few unclosed opening paragraph tags are repeating unnecessarily and I want to remove or replace them with blank space.
I just want the code to identify unclosed paragraph tags and delete them.
Here is a small part of xhtml file:
Eg.
<p><strong>Company Registration No.1</strong> </p>
<p><strong>Company Registration No.2</strong></p>
<p> <!-- extra tag -->
<p> <!-- extra tag -->
<hr/>
<p><strong> HALL WOOD (LEEDS) LIMITED</strong><br/></p>
<p><strong>REPORT AND FINANCIAL STATEMENTS </strong></p>
Thanks a lot in advance.