Salve, ho una funzione che mi gestisce un file xml ma funzione solo su firefox e non vuole funzionare sugli altri browser. Il problema sta solo nella gestione del file xml!!
codice:
function start(){
createAjaxRequest();
objectRequest.onreadystatechange = handleStateChange;
objectRequest.open("GET", path, true);
objectRequest.send(null);
}
function handleStateChange(){
if(objectRequest.readyState == 4){
scan(objectRequest.responseXML);
}
}
function scan( nodo ){
complInd++;
var attrs = "";
if( nodo.nodeType == 1 ){ // Element
for( var atr = 0; atr < nodo.attributes.length; atr++ ) attrs = attrs + " " + nodo.attributes[atr].name + ": " + nodo.attributes[atr].value;
xmlString = xmlString + xs_ind + " <" + nodo.nodeName + attrs + " >
";
if( nodo.hasChildNodes() ){
for( var i = 0; i < nodo.childNodes.length; i++ ){
scan( nodo.childNodes[i] );
}
}
}
Quindi la mia domanda è:
Come faccio a gestire un documento xml con explorer? Il problema è che con gli altri browser mi funziona....