Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道它是否可能在 xslt 中:
<nodea>ABC</nodea? <nodeb></nodeb> </nodec>DEF</nodec>
我希望显示为:
ABC DEF
即不包括节点nodeb。** nodeb 存在,但其中的值不存在。我不想应用模板。
有什么建议么?
看起来你需要这样的东西:
<xsl:for-each select="mypath/*[string-length(.) > 0]"> <xsl:value-of select="." /> <xsl:text> </xsl:text> <!-- end of line character --> </xsl:for-each>