Reputation: 13843
Im trying to output some XML using XSLT, however I've just come across this:
<description><![CDATA[<p>Using Money – recognise coins, getting change, paper money etc. A PowerPoint resource containing colour coded levels to suit different abilities – special needs. Self checking and interactive.</p>]]></description>
How do I output the actual HTML, not the <P>
, but as if it was HTML?
Upvotes: 1
Views: 2019
Reputation: 10188
You can use disable-output-escaping
. Beware, though, that if the input value is not well-formed or valid, the output won't be either.
<xsl:value-of select="description" disable-output-escaping="yes"/>
Upvotes: 2
Reputation: 15806
XSLT handles data already parsed by the XML parser. The CDATA
tags are parsed as text by the XML parser. You might need to do some pre-processing to remove the CDATA
tags before turning over the XML to XSLT.
Upvotes: 0