How can I delete specific rows from a table?
<p>I have a table with <code>n</code> number of rows. The value of <code>n</code> changes/updates every minute.
The first <code>&lt;td&gt;</code> of every row will either contain some text, or it will be blank.
I want to delete/remove all the rows except, the first row and the row whose first cell contains the text <code>'xyz'</code>.
So, how will I be able to do this?
This <code>table</code> element is stored in the variable <code>parentTable</code>.</p>

<p>I'm kind of new to javascript and programming. Any help would be appreciated. Thanks.</p>

<p>I tested it with just the second row, but nothing happened even though the text is not <code>xyz</code> in the cell.  </p>

<pre><code>if(parentNode.childNodes[1].innerText !== "xyz")
parentTable.deleteRow[1];
</code></pre>

<p>And how do I loop around every row and do this?</p>

<p>EDIT: HTML for first cell in every row.</p>

<pre><code>&lt;td class=wbwhite align=center width=40 style="border-top: none; border-left:none; border-right:none;"&gt;
&amp;nbsp;
&lt;a href="www.kasdjfkasd.sadsdk.comi" class=pi&gt;xyz&lt;/a&gt;
&amp;nbsp;
&lt;/td&gt;
</code></pre>
