案例:XML DOM案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript" src="/example/xdom/loadxmldoc.js"></script>
4
</head>
5
<body>
6
7
<script type="text/javascript">
8
9
xmlDoc=loadXMLDoc("/example/xdom/books.xml");
10
x=xmlDoc.getElementsByTagName("title");
11
document.write(x[2].childNodes[0].nodeValue);
12
13
</script>
14
</body>
15
</html>
16