JoeMcGarvey
Programmer
I found a thread with an example provided by Danfood. This HTML example loads an XML and XSL file and outputs the result beautifully and simply in IE. Unfortunately, it only works with IE. Can anyone point me in the right direction towards making this script Mozilla compatible?
Thanks All!
ORIGINAL EXAMPLE BY DANFOOD
<html>
<head><title> YOUR TITLE </title>
<link rel="STYLESHEET" type="text/css" href="YOUR STYLESHEET.css" />
<xml id="GIVE IT AN ID" src="YOUR XML FILE.xml"></xml>
</head>
<script language="javascript">
// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM"
xml.async = false
xml.load("YOUR XML FILE.xml"
// Load the XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM"
xsl.async = false
xsl.load("THE XSL FILE TO DISPLAY THE XML.xsl"
// Transform
document.write(xml.transformNode(xsl))
</script>
</body>
</html>
Thanks All!
ORIGINAL EXAMPLE BY DANFOOD
<html>
<head><title> YOUR TITLE </title>
<link rel="STYLESHEET" type="text/css" href="YOUR STYLESHEET.css" />
<xml id="GIVE IT AN ID" src="YOUR XML FILE.xml"></xml>
</head>
<script language="javascript">
// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM"
xml.async = false
xml.load("YOUR XML FILE.xml"
// Load the XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM"
xsl.async = false
xsl.load("THE XSL FILE TO DISPLAY THE XML.xsl"
// Transform
document.write(xml.transformNode(xsl))
</script>
</body>
</html>