0
我有一個XML和XSL代碼,產品具有圖像和說明。我想在描述標籤中添加這些圖像。如何使用XSL獲取XML元素的價值
<images>
<img_item type_name="">http://www.example.com.tr/ExampleData/example1.jpg</img_item>
<img_item type_name="">http://www.example.com.tr/ExampleData/example2.jpg</img_item>
<img_item type_name="">http://www.example.com.tr/ExampleData/example3.jpg</img_item>
</images>
我寫這樣的XSL代碼(但是它沒有得到img_type的值):
<Description>
<xsl:for-each select="images/img_item">
<xsl:text><![CDATA[<br/><img src="]]></xsl:text>
<xsl:value-of select="images/img_item"/>
<xsl:text><![CDATA[" />]]></xsl:text>
</xsl:for-each>
</Description>
我的代碼不能正常工作。我如何獲得img_type的價值(我怎樣才能得到這些鏈接)
此解決方案工作。謝謝 :) –