Prova questo:
File xml:
<?xml version="1.0" encoding="UTF-8"?>
<TESTI>
<ITEM id="1">Primo</ITEM>
<ITEM id="2">Secondo</ITEM>
<ITEM id="3">Terzo</ITEM>
<ITEM id="4">Quarto</ITEM>
<ITEM id="5">Quinto</ITEM>
</TESTI>
File Ajax:
Codice PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"
>
<
html>
<
head>
<
title>Untitled Document</title>
<
meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<
script language="JavaScript" type="text/JavaScript">
function 
getXmlHttpRequestObject() {
        var 
receiveReq=false//Clear our fetching variable
        
try {
                
receiveReq = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object…
        
} catch (e) {
                try {
                        
receiveReq = new ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
            
} catch (e) {
                
receiveReq false;
                        }
        }
        if (!
receiveReq && typeof XMLHttpRequest!='undefined') {
               
receiveReq = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
        
}
        return 
receiveReq;
    }    
    var 
receiveReq getXmlHttpRequestObject();        
function 
getNewsdoc id
{
    var 
itemContent = new Array();
    
//If our XmlHttpRequest object is not in the middle of a request, start the new asyncronous call.
    
if (receiveReq.readyState == || receiveReq.readyState == 0
    {
        
//Setup the connection as a GET call to your page
        //True explicity sets the request to asyncronous (default).
        
receiveReq.open('GET'doc true);
        
//Set the function that will be called when the XmlHttpRequest objects state changes.
        
receiveReq.onreadystatechange = function()
        {
            if(
receiveReq.readyState==4)
            {
                
// if status == 200 display text file
                    
if(receiveReq.status==200)
                {
                    
data receiveReq.responseXML.getElementsByTagName('ITEM');  
                    for(var 
i=0;i<data.length;i++)
                    {
                        
itemContent[parseInt(data[i].getAttribute('id'))] = data[i].firstChild.nodeValue;
                    } 
                    
alert(itemContent[id]);
               }
        }
        }
        
//Make the actual request.
        
receiveReq.send(null);    
    }    
    
}
window.onload = function()
{
    
getNews("item.xml",1);

}
</script>

</head>

<body>
</body>
</html> 




PS.
Non fare caso ai commenti just recycled
Volendo a getNews puoi passare anche altri parametri.