0
輸入文件中刪除其文本如何刪除XML註釋沒有XSLT
<a>
<b>
<!--<docinfo:topiccodes><docinfo:topiccode>#PA#HKCRP#</docinfo:topiccode> <docinfo:topiccode>#PA#HKCRPM#</docinfo:topiccode><docinfo:topiccode>#PA#HKDIS#</docinfo:topiccode><docinfo:topiccode>#PA#HKDISM#</docinfo:topiccode><docinfo:topiccode>#PA#CODE#</docinfo:topiccode></docinfo:topiccodes>-->
</b>
</a>
輸出expexted
<a>
<b>
<docinfo:topiccodes><docinfo:topiccode>#PA#HKCRP#</docinfo:topiccode> <docinfo:topiccode>#PA#HKCRPM#</docinfo:topiccode><docinfo:topiccode>#PA#HKDIS#</docinfo:topiccode><docinfo:topiccode>#PA#HKDISM#</docinfo:topiccode><docinfo:topiccode>#PA#CODE#</docinfo:topiccode></docinfo:topiccodes>
</b>
</a>
XSLT書面
<xsl:template match="comment()">
<xsl:value-of select="."/>
</xsl:template>
不工作..i試過但它不適合我 –
嗯,我不知道你是如何實現它的。但它正在工作。看到這裏(http://xsltransform.net/3NzcBtz) –
好吧,我在我的代碼中實現它,我認爲我的代碼有任何問題,其他明智的工作正常。 –