|
<INPUT type=button value="ΐ" onClick='xmllink_load()'>
<DIV id="xmllink_test"></DIV>
<SCRIPT language=JavaScript>
var dom,dom2,bIE;
var processor,newFragment; // for Mozilla
if ( document.all ) {
bIE = true;
dom = new ActiveXObject("Msxml2.DOMDocument.3.0");
dom2 = new ActiveXObject("Msxml2.DOMDocument.3.0");
}
else {
bIE = false;
dom = document.implementation.createDocument("", "", null);
dom2 = document.implementation.createDocument("", "", null);
}
dom.async = false;
dom2.async = false;
function xmllink_load() {
dom.load("http://winofsql.jp/xml/xmllink.xml");
dom2.load("http://winofsql.jp/xml/xmllink.xsl");
if ( bIE ) {
document.getElementById("xmllink_test").innerHTML =
dom.transformNode(
dom2.documentElement
);
}
else {
processor = new XSLTProcessor();
processor.importStylesheet(dom2);
newFragment = processor.transformToFragment(dom,document);
document.getElementById("xmllink_test").appendChild(newFragment);
}
}
</SCRIPT>
| |