<?xml version="1.0"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<title>dynamic data loading and intaractive plot</title>
<script type="text/javascript">
<!--
function onload(){
	plotdata = new ActiveXObject("Microsoft.XMLDOM");
	plotdata.async=false;
	plotdata.load("plotdata.xml");
	pdata = plotdata.documentElement;
	splot = document.svgplot.getSVGDocument().documentElement;
	title = pdata.getElementsByTagName("title");
	splot.getElementById("title").firstChild.
		setNodeValue(title[0].firstChild.nodeValue);
	xlab = pdata.getElementsByTagName("xlab");
	ylab = pdata.getElementsByTagName("ylab");
	splot.getElementById("xlab").firstChild.
		setNodeValue(xlab[0].firstChild.nodeValue);
	splot.getElementById("ylab").firstChild.
		setNodeValue(ylab[0].firstChild.nodeValue);

	x = pdata.getElementsByTagName("x")[0].firstChild.nodeValue.split(" ");
	y = pdata.getElementsByTagName("y")[0].firstChild.nodeValue.split(" ");

	tmp = splot.getElementById("dpt").getChildNodes.item(3);
	for(var i=0;i<x.length;i++){
		insnode = tmp.cloneNode(true);
		insnode.setAttribute("x",x[i]);
		insnode.setAttribute("y",y[i]);
		splot.getElementById("dpt").insertBefore(insnode,tmp);
	}
}
//-->
</script>
</head>
<body onload="onload()">
<embed name="svgplot" width="340" height="320" src="plotarea.svg" />
</body>
</html>