2
我試圖從XML文件中過濾掉不需要的數據。 我有以下XML:如何根據他的一個孩子的值使用XSLT刪除完整節點
<Client>
<Address>
</Address>
<Documents>
<Invoice>
<Document></Document>
<No>9999<No>
<Content>H4s==</Content>
</Invoice>
<Invoice>
<Document>
<File>
<Code>THIS IS THE ONE<Code>
<Name>
<value locale="en">Invoice for January</value>
</Name>
</File>
</Document>
<No>7777</No>
<Content>H4sIAA1XyDQA=</Content>
</Invoice>
</Documents>
</Client>
而且我不希望在結果中的所有<Invoice>
其中<Document>
標籤是空的。
因此,在某種意義上,結果會是什麼樣子:
<Client>
<Address>
</Address>
<Documents>
<Invoice>
<Document>
<File>
<Code>THIS IS THE ONE<Code>
<Name>
<value locale="en">Invoice for January</value>
</Name>
</File>
</Document>
<No>7777</No>
<Content>H4sIAA1XyDQA=</Content>
</Invoice>
</Documents>
</Client>
感謝,
1爲一個正確答案。 –
謝謝。那做了這個工作。 – Ergosum
@Ergosum - 不客氣。請考慮通過點擊答案旁邊的複選標記來接受我的答案。謝謝! –