案例:XML DOM案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript" src="/example/xdom/loadxmldoc.js"> 
4
</script>
5
</head>
6
<body>
7
8
<script type="text/javascript">
9
xmlDoc=loadXMLDoc("/example/xdom/books.xml");
10
11
document.write("XML encoding: " + xmlDoc.xmlEncoding);
12
document.write("<br />");
13
document.write("XML standalone: " + xmlDoc.xmlStandalone);
14
document.write("<br />");
15
document.write("XML version: " + xmlDoc.xmlVersion);
16
document.write("<br />");
17
document.write("Encoding used when parsing: " + xmlDoc.inputEncoding);
18
</script>
19
20
</body>
21
</html>
22