I addd numeroDeJugadores because, eventually, it will be an array where I will store multiple “jugadores” (players) with “nombre” (name) and “puntos” (score), so I want to append to the xml file each time the game ends, and then I will display the highest scores. Thanks.
I see. My point is that you need to use the same tag name in both places: where you addChild, and where you setTo. If your child is jugador, but you try setTo with jugador7, then probably the setTo fails because there is no jugador7, and the next addValues end up next to jugador, not inside.