Se usi JQuery e' molto facile e veloce scrivere un parser XML fatto apposta per la struttura del tuo documento XML.
Potresti ad esempio fare qualcosa del genere:
L'ho scritto velocemente senza provare, ma questa e' l'idea.Codice PHP:
var PARSER = {
getCodice: function (row) {
return $(row).attr('Codice');
}
}
$.get ('url/alla/pagina/php/che/genera/xml', function(data) {
$(data).find('segnalino').each(function() {
var codice = PARSER.getCodice (this);
});
});