Displaying embedded html from an xml file through an xsl style sheet
Hi chaps
I've got an XML file, within that file i've embedded html code using the
<![CDATA[ ]]>
tag
I'm displaying that xml file through a browser using an xsl style sheet. However it is displaying any html from the xml file as text, ie its displaying as text <br/> and <b> etc
How can i tell my xml file to display the html tags as html and not display them as text?
Many thanks
embedding html ttags in xml
Hi Guys,
I have a scenario:
XML File:
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="mystyle.xsl" ?>
<reportpage>
<name>Bid Administration Report Summary</name>
<htmldata> <b>abcd></b> should appear bold. any html tags can appear here.</htmldata>
</reportpage>
I wanted to know if anything in <htmldata> tag, can be made to be processed as HTML. Meaning 'abcd' should appear bold in the browser. Right now, it is ignoring the bold tag. Below is the xsl i am using. Please let me know if this is possible guys.
My XSL file:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="reportpage">
<html>
<head>
<title><xsl:value-of select="name" /></title>
</head>
<body>
<h1 align="center"><xsl:value-of select="name" /></h1>
<xsl:value-of select="htmldata" disable-output-escaping="yes" />
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Thanks in advance,
Arun