How to remove elements in a html string
<pre><code>   &lt;div&gt;
       &lt;span&gt;ABC&lt;/span&gt;
        &lt;ul&gt;
             &lt;li&gt;list&lt;/li&gt;
             &lt;li&gt;list&lt;/li&gt;
             &lt;span&gt;ABC&lt;/span&gt;
             &lt;li&gt;list&lt;/li&gt;
        &lt;ul&gt;
        &lt;span&gt;ABC&lt;/span&gt;
  &lt;/div&gt;
</code></pre>

<p>This is myString variable, now i want to remove the span elements from this string? So myString will be:</p>

<pre><code>   &lt;div&gt;
        &lt;ul&gt;
             &lt;li&gt;list&lt;/li&gt;
             &lt;li&gt;list&lt;/li&gt;
             &lt;li&gt;list&lt;/li&gt;
        &lt;ul&gt;
  &lt;/div&gt;
</code></pre>

<p>Thanks
(remove() only works on top level elements)</p>
