local xml
<?xml version="1.0" encoding="gb2312" ?>
<user>
<username>admin</username>
<password>123456</password>
</user>
html read xml:
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
var xdoc = new ActiveXObject("Microsoft.XMLDOM");
xdoc.async="true";
xdoc.load('test.xml');
nodes=xdoc.documentElement.childNodes;
document.write("<li>"+nodes.item(0).text+"</li><li>"+nodes.item(1).text+"</li>")
alert(nodes.item(0).text);
alert(nodes.item(1).text);
</SCRIPT>
</head>
<body >
</body>
</html>