xml transformNode xsl

<html>
<body>

<script type="text/javascript">

// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("a.xml")

// Load XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("a.xsl")

// Transform
//document.write(xml.transformNode(xsl))

</script>
<div id="myDiv" style="border:solid red 1px;">
</div>
</body>
</html>
<script>
var obj = document.getElementById("myDiv");
alert(obj);
obj.innerHTML = xml.transformNode(xsl);
</script>

你可能感兴趣的:(transform)