I have a lot of HTML files such as:
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">some text</P>
<TABLE class=MsoNormalTable style="BORDER-RIGHT: windowtext 1pt solid;" cellSpacing=0 cellPadding=0 width=568 border=1>
<TR style="HEIGHT: 12.75pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes">
<TD style="BORDER-RIGHT: windowtext 1pt solid;" width=357 colSpan=2>text td</TD>
</TR>
</TABLE>
我需要将其所有属性和类都移除,以便得到以下结果:
<P>some text</P>
<TABLE>
<TR>
<TD>text td</TD>
</TR>
</TABLE>
我已经尝试使用不同选项的 tidy
工具(如 drop-proprietary-attributes、word-2000),但无法得到干净的代码。
<style></style>
标记。 - gabriel garcia