XSL显示属性名称
问题描述:
所以,使用XSL显示属性名称
<xsl:for-each select="./@*">
[<xsl:value-of/><xsl:value-of select="."/>]
</xsl:for-each>
我可以遍历属性值。 但我也想看到属性名称。
我想看到一个表: attR1位 - VAL1 attR2位 - VAL2 attr3 - VAL3 ...
感谢您的帮助!
答
你可以做,使用name()
或local-name()
:
<xsl:for-each select="./@*">
[<xsl:value-of select="name()"/><xsl:value-of select="."/>]
</xsl:for-each>
首先是最好的)谢谢! – dart 2010-07-28 17:29:45