使用xslt从xml文件中排除不需要的子节点 [英] Excluding unwanted childnodes from xml file using xslt
本文介绍了使用xslt从xml文件中排除不需要的子节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<Hello>
<Title>Wish</Title>
<Para>Hi
<?fm condstart Omittednotes?>
Unwanted messages
<?fm condstart Omittednotes?>
thanks for helping me.
</Para>
</Hello>
我的代码1:
My code 1:
<xsl:for-each select="Para">
<xsl:value-of select=".">
</xsl:for-each>
接收到的输出:您好不需要的消息,感谢您的帮助
我的代码2:
Received output:Hi unwanted messages thanks for helping me
My code 2:
<xsl:for each select="Para">
<xsl:value-of select="text()">
</xsl:for each select>
收到的输出:Hi
预期的输出:您好,谢谢您的帮助.
Received output: Hi
Expected output: Hi thanks for helping me.
推荐答案
大家好,由于省略的注释部分不是子节点,因此肯定会显示出来.因此,我不想麻烦大家.
Hi all, since the omitted note portion is not the childnode it will be displayed for sure. Therefore I do not want to trouble you all, thanks.
这篇关于使用xslt从xml文件中排除不需要的子节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文