XSLT - HTML Format shown as it is in Result

XSLT Element

The <xsl:value-of> element element extracts the value of a selected node.

The <xsl:value-of> element can be used to select the value of an XML element and add it to the output.

Note: The value of the required select attribute contains an XPath expression. It works like navigating a file system where a forward slash (/) selects subdirectories.

Syntax

<xsl:value-of
select="expression"
disable-output-escaping="yes|no"/>
Attributes


1. select - expression - Required. An XPath expression that specifies which node/attribute to extract the value from.


2. disable-output-escaping yes/no - Optional - "yes" indicates that special characters (like "<") should be output as is. "no" indicates that special characters (like "<") should be output as "<". Default is "no"
In Database I have HTML Code - but when using XSLT it return the code as it is



in XSL(T) add the script <xsl:value-of disable-output-escaping="yes" select="TDesc"/>

you will get correct result

Example / I faced an issue

XML

<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="../XSL/JavaScript.xsl"?>
<catalog>
<cd>
<title>
Pra<b>thee</b>skumar</title>
<artist>Vijayakanth</artist>
</cd>
</catalog>

XSL

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="/">
<xsl:for-each select="catalog/cd">
<xsl:value-of disable-output-escaping="yes" select="title"/>
<br />
<xsl:value-of select="title"/>
<br/>
<xsl:value-of select="artist"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

Result

Pratheeskumar
Pra<b>thee</b>skumar
Vijayakanth