I have an XML file:
<root>
<foo>
<!--Content Here-->
</foo>
</root>
Now I want generate an HTML file from it. The HTML has two vertical frames. The left one displays the treeview of the XML file. And I want the right one display content of the tree view: when I click on the "foo" node, the content will be displayed on the right.
Now I have written an XSL file to get a treeview and an HTML file which has:
<html>
<head>
<script language="javascript">
function populateFrames(){
var x = new ActiveXObject("Microsoft.XMLDOM");
var s = new ActiveXObject("Microsoft.XMLDOM");
x.async = false
s.async = false
x.load("source.xml");
s.load("tree.xsl");
var html = x.transformNode(s);
var destination = document.frames("header").document.open("text/html","replace");
destination.write(html);
}
</script>
</head>
<frameset onload="populateFrames()" cols="25%,*">
<frame name="header" scrolling="auto" target="main">
<frame name="main">
</frameset>
</html>
As you can see, the tree will display in the "header" frame, and I want the content in the "main" frame.
Could anyone tell me how to do this? It's very urgent: I'm waiting on line. Thanks very much for your help.