0
我嘗試刪除td有class = feldtyp1且文本內容爲<p>News</p>
的每個錶行。Howe刪除帶有文本內容的錶行
我已經到目前爲止,整行被刪除。 現在我仍然需要查詢是否與包含文本內容的類feldtyp1的單元格新聞
有人可以幫助我嗎?我的源XML的
部分
<table class="feldtyp">
<tr>
<td class="feldtyp1"><p>Feldtyp</p></td>
<td class="feldtyp2"><p>Text</p></td>
</tr>
<tr>
<td class="feldtyp1"><p>News</p></td>
<td class="feldtyp2"><p>Text</p></td>
</tr>
</table>
我現在的XLS刪除所有行
<xsl:output omit-xml-declaration="yes"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="tr|td[@class='feldtyp1']"/>
<xsl:template match="tr|td[@class='feldtyp2']"/>
</xsl:stylesheet>
期望的結果應該是這樣的
<table class="feldtyp">
<tr>
<td class="feldtyp1"><p>Feldtyp</p></td>
<td class="feldtyp2"><p>Text</p></td>
</tr>
</table>
謝謝,這正是我尋找。 – Olli