How to extract the elements from td ignoring the span element that has visibilty:hidden?
<p>Sample code</p>

<pre><code>   &lt;table&gt;
        &lt;tr class="1"&gt;
            &lt;td&gt;
                Top&lt;br&gt;
                &lt;span style="visibility: hidden; color: red" id="span1"&gt;Ignore&lt;/span&gt;
            &lt;/td&gt;
            &lt;td&gt;
                &lt;br&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr class="2"&gt;
            &lt;td&gt;
                Bottom&lt;br&gt;
                &lt;span id="span2"&gt;Pick Me&lt;/span&gt;
            &lt;/td&gt;
            &lt;td&gt;
                &lt;br&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
</code></pre>

<p></p>

<p>Output required</p>

<blockquote>
  <p>Top Bottom Pick Me</p>
</blockquote>
