XSLTGeneral questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
I have a javascript function in CDATA that loops through XML and prints the node but its failing. I just looked at the source and found that the XSL for some reason doesnt escape html for instance
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
function loadXML(xmlFile)
{
alert('loadXML function reached');
xmlDoc.async="false";
xmlDoc.onreadystatechange=verify;
xmlDoc.load(xmlFile);
xmlObj=xmlDoc.documentElement;
var colLabels = xmlDoc.selectNodes("//node[node/@id ='jjkuh99']/node");
for (var i = 0; i < colLabels.length; i++)
{
var olabels = colLabels[i];
var olabelValue = olabels.selectNodes("label")[0];
var olabelLink = olabels.selectNodes("link/value")[0];
when I look at the source on the preview page it sbstitutes all ( < ) to ( & l t ;) so where ever you see < in for loop and document.write. It replaces them into & l t ; I want to know if there is a way around it where it can place < (less than ) instead of & l t ; I hope im making sense.