Più che XML, la domanda attiene javascript, quindi sposto il thread nel forum più corretto