代码如下。在Internet explorer里可以用XMLDocument属性来访问<xml>元素的内容。android浏览器里试了下没反应,还把xml里面的内容都给显示出来了。如果js做不到的话应该如何实现?<html  >
<head>
    <title>Untitled Page</title>
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
<!--

function check(){
var xml1 = document.getElementById("xml1");
var oNode = xml1.XMLDocument.selectSingleNode("books/book/author");
alert(oNode.text);
////alert(xml1.XMLDocument);
}

//-->
</SCRIPT>
<INPUT TYPE=button VALUE="Test" onclick="check()" ID="Button4" NAME="Button4">
<xml id="xml1" >    <!-- src="books.xml" -->
  <books>
    <book>
        <author>Carson</author>
        <price format="dollar">31.95</price>
        <pubdate>05/01/2001</pubdate>
    </book>
    <pubinfo>
        <publisher>MSPress</publisher>
        <state>WA</state>
    </pubinfo>
  </books>
</xml>
</body>
</html>