So far I have managed to get what I need from the xml list, but the issue is that I have twice the center and two times Alameda stay AlamedaCentroCentroAlameda, someone to help me with how to make it go out just once?
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js">
</script>
<script>
$(document).ready(function() { //se empieza a ejecutar cuando el DOM esté listo
$.get("marcadores.xml", {}, function(xml) { //Abrimos el archivo marcadores.xml
//El ciclo se va repetir cada vez que se encuentre la etiqueta Usuario
$('Usuario', xml).each(function() {
var Sector = $(this).find('Sector').text();
console.log(Sector);
$('<option>'+Sector+'</option>').appendTo('#Lista')
console.log(Lista)
})
})
})
</script>
</head>
<body>
<datalist id="Lista"></datalist>
<input type="text" name="Texto" list="Lista">
</body>
</html>