You also uses JavaScript to load a source and stylesheet document and display the result in the body of the HTML page.
<html>
<head>
<title>Transform Sample</title>
<script language="javascript">
function init()
{
// load XML source document
var source = new ActiveXObject("Msxml2.DOMDocument.6.0");
source.async = false;
source.load("helloworld.xml");
// load XSLT stylesheet document
var stylesheet = new ActiveXObject("Msxml2.DOMDocument.6.0");
stylesheet.async = false;
stylesheet.load("helloworld.xsl");
// transform the source using the XSLT stylesheet
target.innerHTML = source.transformNode(stylesheet);
}
</script>
</head>
<body onload="init()">
<div id="target" />
</body>
</html>
Note
Google Chrome, Mozilla Firefox and Microsoft Edge don't support ActiveXObject
, and never have, and never will. ActiveX has no place in modern web browsers, only IE supports ActiveXObject.