samedi 14 mars 2015

Get html from CDATA in xml

[unable to retrieve full-text content]

I have a xml:





<item>
<title>This is title</title>
<description>
<![CDATA[<a href="#"><img src="http://ift.tt/1wKwwcV" ></a>
</br>Something...blah blah blah]]>
</description>
</item>



I want to use xsl to transform it to html, but in output html, the tag only display in text, not a link. So, how to do that?


This is my xsl:





<xsl:template match="/">
<html>
<body>
<xsl:for-each select="/item">
<xsl:value-of select="title"/>
<xsl:value-of select="description"/>
</xsl:for-each>
</body>
</html>
</xsl:template>







Get html from CDATA in xml

Aucun commentaire:

Enregistrer un commentaire