Howe to delete table rows with text content <p>I try to delete each table row where td has class=feldtyp1 and the text content is <code>&lt;p&gt;News&lt;/p&gt;</code>.</p> <p>I am already come so far that the whole row is deleted. Now I still need the query whether the cell with the class feldtyp1 containing textual content News</p> <p>Could someone help me?</p> <p><strong>Part of my source XML</strong></p> <pre><code>&lt;table class="feldtyp"&gt; &lt;tr&gt; &lt;td class="feldtyp1"&gt;&lt;p&gt;Feldtyp&lt;/p&gt;&lt;/td&gt; &lt;td class="feldtyp2"&gt;&lt;p&gt;Text&lt;/p&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="feldtyp1"&gt;&lt;p&gt;News&lt;/p&gt;&lt;/td&gt; &lt;td class="feldtyp2"&gt;&lt;p&gt;Text&lt;/p&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p><strong>My current XLS deletes all rows</strong></p> <pre><code>&lt;xsl:output omit-xml-declaration="yes"/&gt; &lt;xsl:template match="node()|@*"&gt; &lt;xsl:copy&gt; &lt;xsl:apply-templates select="node()|@*"/&gt; &lt;/xsl:copy&gt; &lt;/xsl:template&gt; &lt;xsl:template match="tr|td[@class='feldtyp1']"/&gt; &lt;xsl:template match="tr|td[@class='feldtyp2']"/&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p><strong>The desired result should look like this</strong></p> <pre><code>&lt;table class="feldtyp"&gt; &lt;tr&gt; &lt;td class="feldtyp1"&gt;&lt;p&gt;Feldtyp&lt;/p&gt;&lt;/td&gt; &lt;td class="feldtyp2"&gt;&lt;p&gt;Text&lt;/p&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre>