Esto me funciona correctamente en ambos navegadores:
Código PHP:
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test</title>
<script>
function ajax(){
if(window.XMLHttpRequest){
return new XMLHttpRequest();
}else{
try{
return new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){
return false;
}
}
}
function consultar(){
var aj=ajax();
if(!aj){
alert('error');
return;
}
aj.open('get','xml.xml',true);
aj.onreadystatechange=function(){
if(aj.readyState==4){
xml=aj.responseXML.documentElement;
document.getElementById('pp').innerHTML='Nodo marker<br />-lat='+xml.getElementsByTagName('marker')[0].getAttribute('lat')+'<br />-lng='+xml.getElementsByTagName('marker')[0].getAttribute('lng')+'<br />-name='+xml.getElementsByTagName('marker')[0].getAttribute('name')+'<br />-url='+xml.getElementsByTagName('marker')[0].getAttribute('url')+'<br /><br />Nodo concierto<br />-name='+xml.getElementsByTagName('concierto')[0].getAttribute('name')+'<br />-fecha='+xml.getElementsByTagName('concierto')[0].getAttribute('fecha')+'<br />-hora='+xml.getElementsByTagName('concierto')[0].getAttribute('hora')+'<br />-precio='+xml.getElementsByTagName('concierto')[0].getAttribute('precio');
}else
document.getElementById('pp').innerHTML='cargando...';
}
aj.send(null);
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<input type="button" name="Submit" value="try" onclick="consultar()" />
</form><div id="pp"></div>
</body>
</html>
Y esto:
Código PHP:
//...
xml=aj.responseXML.documentElement;
alert(xml.getElementsByTagName('marker').length)
//...
Devuelve 1 en ambos navegadores.