'</xsl:stylesheet>
function generatetable() {
var tbl="<table border='1' cellpadding='5px'><tr><th>customerId</th><th>name</th><th>country</th></tr>";
for (var index = 0; index < customers.length; index++) {
console.log(customers[index].customerId);
var color = (index % 2 ==0) ? 'red': 'blue';
tbl+="<tr style='background-color:"+color+"'><td>"+customers[index].customerId+"</td><td>"+customers[index].name+"</td><td>"+customers[index].country+"</td></tr>";
}
tbl+="</table>";
var dvTable = document.getElementById("dvTable").innerHTML=tbl;
}
<xsl:element name="DIV">
<xsl:attribute name="ID ">dvTable</xsl:attribute>
</xsl:element>
</xsl:stylesheet>'
Above is the code snippet from one of the xsl FILe which is process sever side but it gave me error on customers.length; also <, >symbols how can I add above javascript code in xsl.