¿Alguien podría decirme por qué? ¿y alguna manera de solucionarlo?
Como siempre, muchas gracias!
Documento XML
Código PHP:
   <CATALOGO>
     <PRODUCTO ref="0">
          <NOMBRE>xxxxxxxxxxxxx</NOMBRE>
          <DESCRIPCION>Esto es una prueba de xml</DESCRIPCION>
          <QUOTE>Probando xml</QUOTE>
          <FOTO1>../img/p1.jpg</FOTO1>
          <FOTO2>../img/p2.jpg</FOTO2>
          <FOTO3>../img/p3.jpg</FOTO3>
          <FOTO4>../img/p4.jpg</FOTO4>
          <FOTO5>../img/p5.jpg</FOTO5>
          <FOTO6>../img/p6.jpg</FOTO6>
          <MARCA>xxxxxxxxxxxxxxx</MARCA>
     </PRODUCTO>
</CATALOGO> 
    Código PHP:
   <html>
    <head>
        <style>
            body{font-family:Verdana, Geneva, sans-serif; margin:0; padding:0;}
            h1{font-size:2em;}
            h2{font-size:1.5em;}
            h3{font-size:1em;}
            img{padding:5px;}
            #contenedor{width:auto; height:auto; background:#CCC; border:1px solid #666; padding-left:50px; padding-bottom:10px;}
        </style>
    </head>
    <body>
    
    <script type="text/javascript">
        if (window.XMLHttpRequest){
            xmlhttp=new XMLHttpRequest();
            }
            else {
                xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
                }
                
        xmlhttp.open("GET","productos.xml",false);
        xmlhttp.send();
        xmlDoc=xmlhttp.responseXML;
        
        var x=xmlDoc.getElementsByTagName("PRODUCTO");
        var ref=1;
        var y=x[ref];
          document.write("<div id='contenedor'>");
          document.write("<h1>");
          document.write(y.getElementsByTagName("NOMBRE")[0].childNodes[0].nodeValue);
          document.write("<h1><h2>");
          document.write(y.getElementsByTagName("DESCRIPCION")[0].childNodes[0].nodeValue);
          document.write("</h2><h3>");
          document.write(y.getElementsByTagName("QUOTE")[0].childNodes[0].nodeValue);
          document.write("</h3><img src='");
          document.write(y.getElementsByTagName("FOTO1")[0].childNodes[0].nodeValue);
          document.write("'/><img src='");
          document.write(y.getElementsByTagName("FOTO2")[0].childNodes[0].nodeValue);
          document.write("'/><img src='");
          document.write(y.getElementsByTagName("FOTO3")[0].childNodes[0].nodeValue);
          document.write("'/><img src='");
          document.write(y.getElementsByTagName("FOTO4")[0].childNodes[0].nodeValue);
          document.write("'/><img src='");
          document.write(y.getElementsByTagName("FOTO5")[0].childNodes[0].nodeValue);
          document.write("'/><img src='");
          document.write(y.getElementsByTagName("FOTO6")[0].childNodes[0].nodeValue);
          document.write("'/>");
          document.write("</div>");
    </script>
    
    </body>
</html> 
   
 

