In the below html tags, I want to use c# programs to remove the whole tags which has the attribute values "display:none" in style:
<td>
<span style="display:none">
<font color="#ffffff">OK</font>
</span>
<span>
<font color="#ffffff">OK</font>
</span>
</td>
and the html will become:
<td>
<span>
<font color="#ffffff">OK</font>
</span>
</td>
Besides using Replace() function, Can anyone suggest me some ways to solve this problem?
Fortunately you can use jQuery like sintaxys in C# using CsQuery
I don’t test it but is a good starting point
In a DOM with more than one display:none, as metioned @jamietre in comments