0

Ok,

So in my XML file I have an image node:

<img alt="Green arrow" src="green-arrow-up-icone-5011-48.png"/>

Now I want to display this in my webpage using XSL:

If I use <xsl:value-of select = "//img"/>

(there is only one image), I don't get anything because the "value of" img is nothing as it has no nodes in it. How do I make XSL just take that node as it is and just display it on the webpage?

4

2 回答 2

1
<xsl:copy-of select="expression"/> 

http://www.w3schools.com/xsl/el_copy-of.asp

于 2012-05-16T17:40:03.893 回答
1

分别有xsl:copy-of例如。<xsl:copy-of select="img"/><xsl:template match="img"><xsl:copy-of select="."/></xsl:template>

于 2012-05-16T17:41:30.920 回答